Skip to content

Commit fc04145

Browse files
committed
Use feature to select C++ standard
This makes the C++ standard part of the public interface.
1 parent a8bad3f commit fc04145

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ endif()
1212

1313
add_library(wideint INTERFACE wideint.hpp)
1414
target_include_directories(wideint INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>)
15-
set_target_properties(wideint PROPERTIES CXX_STANDARD 20)
15+
target_compile_features(wideint INTERFACE cxx_std_20)
1616

1717
if(BUILD_TESTING)
1818
add_executable(test_wideint test/test_main.cpp test/test_wuint.cpp test/test_wint.cpp)
1919
target_link_libraries(test_wideint PRIVATE wideint)
20-
set_target_properties(test_wideint PROPERTIES CXX_STANDARD 20)
2120

2221
add_test(test_wideint test_wideint)
2322
endif()

0 commit comments

Comments
 (0)