feat: 💥 API-related Conan, CMake, and preprocessor options redesigned

This commit is contained in:
Mateusz Pusz
2024-04-16 21:48:36 +01:00
parent 7b57ce5ab1
commit 8e0a26b933
26 changed files with 490 additions and 207 deletions

View File

@@ -27,4 +27,4 @@ find_package(mp-units REQUIRED)
add_executable(test_package test_package.cpp)
target_link_libraries(test_package PRIVATE mp-units::mp-units)
target_compile_definitions(test_package PRIVATE MP_UNITS_USE_FMTLIB=$<BOOL:${MP_UNITS_USE_FMTLIB}>)
target_compile_definitions(test_package PRIVATE MP_UNITS_API_STD_FORMAT=$<BOOL:${MP_UNITS_API_STD_FORMAT}>)

View File

@@ -39,8 +39,8 @@ class TestPackageConan(ConanFile):
def generate(self):
tc = CMakeToolchain(self)
tc.variables["MP_UNITS_USE_FMTLIB"] = bool(
self.dependencies["mp-units"].options.use_fmtlib
tc.variables["MP_UNITS_API_STD_FORMAT"] = bool(
self.dependencies["mp-units"].options.std_format
)
tc.generate()