Skip to content

Commit 825e6d6

Browse files
committed
don't try to build c++23 target without c++23 support
1 parent 91298a7 commit 825e6d6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,16 @@ endfunction()
6666

6767
add_executable(libut_tests_17 ${cxx_17_files})
6868
add_executable(libut_tests_20 ${cxx_20_files})
69-
add_executable(libut_tests_23 ${cxx_23_files})
7069

7170
target_compile_features(libut_tests_17 PUBLIC cxx_std_17)
7271
target_compile_features(libut_tests_20 PUBLIC cxx_std_20)
73-
target_compile_features(libut_tests_23 PUBLIC cxx_std_23)
7472

7573
setup_target(libut_tests_17)
7674
setup_target(libut_tests_20)
75+
7776
if(HAS_CXX_23)
77+
add_executable(libut_tests_23 ${cxx_23_files})
78+
target_compile_features(libut_tests_23 PUBLIC cxx_std_23)
7879
setup_target(libut_tests_23)
7980
if(NOT MSVC)
8081
target_link_libraries(libut_tests_23 PUBLIC stdc++exp)

0 commit comments

Comments
 (0)