From 89f3e4df260b3f34b7ebc3284b2fdd6697c9f677 Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 23 May 2024 21:29:30 +0900 Subject: [PATCH] (#22574) reflect-cpp: add version 0.10.0 * reflecet-cpp: add version 0.7.0 * update 0.8.0 * Set CMAKE_CXX_STANDARD 20 * update 0.9.0 * try to fix MSVC compilation error * simplify patch, drop support toml and msgpack * add patch_source, downgrade flatbuffers * update 0.10.0 * remove patches --------- Co-authored-by: Francisco Ramirez de Anton --- recipes/reflect-cpp/all/conandata.yml | 3 +++ recipes/reflect-cpp/all/conanfile.py | 12 +++--------- recipes/reflect-cpp/all/test_package/CMakeLists.txt | 6 +++++- recipes/reflect-cpp/config.yml | 2 ++ 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/recipes/reflect-cpp/all/conandata.yml b/recipes/reflect-cpp/all/conandata.yml index e8f0dda436088..99aed4ef3704c 100644 --- a/recipes/reflect-cpp/all/conandata.yml +++ b/recipes/reflect-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.10.0": + url: "https://github.com/getml/reflect-cpp/archive/v0.10.0.tar.gz" + sha256: "d2c8876d993ddc8c57c5804e767786bdb46a2bdf1a6cd81f4b14f57b1552dfd7" "0.6.0": url: "https://github.com/getml/reflect-cpp/archive/v0.6.0.tar.gz" sha256: "D8231B91989397A67E841B56A0673FDCDF969DBE956D54BB629F14100B030664" diff --git a/recipes/reflect-cpp/all/conanfile.py b/recipes/reflect-cpp/all/conanfile.py index 4952fc02f03a6..ddf0ede842e03 100644 --- a/recipes/reflect-cpp/all/conanfile.py +++ b/recipes/reflect-cpp/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy, export_conandata_patches, apply_conandata_patches +from conan.tools.files import get, copy from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.layout import basic_layout @@ -14,7 +14,7 @@ class ReflectCppConan(ConanFile): license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/getml/reflect-cpp" - topics = ("reflection", "serialization", "memory", "json", "xml", "flatbuffers", "header-only") + topics = ("reflection", "serialization", "memory", "json", "xml", "flatbuffers", "yaml", "toml", "msgpack", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" options = { @@ -44,9 +44,6 @@ def _compilers_minimum_version(self): "apple-clang": "15", } - def export_sources(self): - export_conandata_patches(self) - def layout(self): basic_layout(self, src_folder="src") @@ -59,7 +56,7 @@ def requirements(self): self.requires("flatbuffers/23.5.26", transitive_headers=True) if self.options.with_yaml: self.requires("yaml-cpp/0.8.0", transitive_headers=True) - + def package_id(self): self.info.clear() @@ -75,9 +72,6 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - apply_conandata_patches(self) - def package(self): copy(self, pattern="LICENSE*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy( diff --git a/recipes/reflect-cpp/all/test_package/CMakeLists.txt b/recipes/reflect-cpp/all/test_package/CMakeLists.txt index 66b58d7b20ff5..1a6253f9dc61a 100644 --- a/recipes/reflect-cpp/all/test_package/CMakeLists.txt +++ b/recipes/reflect-cpp/all/test_package/CMakeLists.txt @@ -1,8 +1,12 @@ cmake_minimum_required(VERSION 3.12) project(test_package LANGUAGES CXX) +if (NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 20) +endif() +set(CMAKE_CXX_STANDARD_REQUIRED ON) + find_package(reflect-cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE reflect-cpp::reflect-cpp) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/reflect-cpp/config.yml b/recipes/reflect-cpp/config.yml index 7d9ba9dbc8ac9..20f0e943b9aeb 100644 --- a/recipes/reflect-cpp/config.yml +++ b/recipes/reflect-cpp/config.yml @@ -1,3 +1,5 @@ versions: + "0.10.0": + folder: all "0.6.0": folder: all