Skip to content

Commit

Permalink
(#22574) reflect-cpp: add version 0.10.0
Browse files Browse the repository at this point in the history
* 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 <franchuti688@gmail.com>
  • Loading branch information
toge and franramirez688 authored May 23, 2024
1 parent 1292b47 commit 89f3e4d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions recipes/reflect-cpp/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -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"
12 changes: 3 additions & 9 deletions recipes/reflect-cpp/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 = {
Expand Down Expand Up @@ -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")

Expand All @@ -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()

Expand All @@ -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(
Expand Down
6 changes: 5 additions & 1 deletion recipes/reflect-cpp/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 2 additions & 0 deletions recipes/reflect-cpp/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"0.10.0":
folder: all
"0.6.0":
folder: all

0 comments on commit 89f3e4d

Please sign in to comment.