File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,13 @@ message(STATUS "MP_UNITS_BUILD_CXX_MODULES: ${MP_UNITS_BUILD_CXX_MODULES}")
2828find_package (mp-units REQUIRED )
2929
3030add_executable (test_package-headers test_package.cpp )
31- target_compile_features (test_package-headers PRIVATE cxx_std_20 )
31+ target_compile_features (test_package-headers PRIVATE $< IF :$< BOOL : ${CMAKE_CXX_MODULE_STD} >, cxx_std_23 , cxx_std_20 > )
3232target_link_libraries (test_package-headers PRIVATE mp-units::mp-units )
3333
3434if (MP_UNITS_BUILD_CXX_MODULES)
3535 add_executable (test_package test_package.cpp )
36- target_compile_features (test_package PRIVATE cxx_std_20 )
36+ target_compile_features (test_package PRIVATE $<IF :$<BOOL :${CMAKE_CXX_MODULE_STD} >,cxx_std_23 ,cxx_std_20 >)
37+ # TODO clang complains about missing module
38+ # target_compile_definitions(test_package PRIVATE MP_UNITS_MODULES)
3739 target_link_libraries (test_package PRIVATE mp-units::mp-units )
3840endif ()
You can’t perform that action at this time.
0 commit comments