Skip to content

Commit

Permalink
Use feature to select C++ standard
Browse files Browse the repository at this point in the history
This makes the C++ standard part of the public interface.
  • Loading branch information
jibsen committed Mar 17, 2024
1 parent a8bad3f commit fc04145
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ endif()

add_library(wideint INTERFACE wideint.hpp)
target_include_directories(wideint INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>)
set_target_properties(wideint PROPERTIES CXX_STANDARD 20)
target_compile_features(wideint INTERFACE cxx_std_20)

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

add_test(test_wideint test_wideint)
endif()

0 comments on commit fc04145

Please sign in to comment.