mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 12:54:25 +02:00
feat: 💥 API-related Conan, CMake, and preprocessor options redesigned
This commit is contained in:
@@ -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}>)
|
||||
|
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user