Skip to content

Commit 08de0a6

Browse files
committed
fix: account for C++23 tests
1 parent 963462c commit 08de0a6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

regression-tests/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,15 @@ function(cppfront_build_tests)
145145
configure_file("cmake/CMakeLists.txt.in" "${test_dir}/CMakeLists.txt" @ONLY)
146146
configure_file("cmake/test-case-config.cmake.in" "${test_dir}/test-case-config.cmake.in" COPYONLY)
147147

148+
set(
149+
cxx_23_tests
150+
pure2-bugfix-for-empty-index
151+
)
152+
set(extra_flags)
153+
if (test_name IN_LIST cxx_23_tests)
154+
list(APPEND extra_flags "-DCMAKE_CXX_STANDARD=23")
155+
endif ()
156+
148157
add_test(
149158
NAME "build/${test_name}"
150159
COMMAND
@@ -157,6 +166,7 @@ function(cppfront_build_tests)
157166
"-Dcppfront_DIR=${cppfront_DIR}"
158167
"-Dcppfront-exe_DIR=${cppfront-exe_DIR}"
159168
"-DCPPFRONT_FLAGS=${ARG_EXTRA_FLAGS}"
169+
${extra_flags}
160170
# There's `CMAKE_CXX_LINKER_LAUNCHER`, too. So far, it's not needed.
161171
"-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_COMMAND};-D;OUTPUT_FILE=${gen_cpp_src}.output;-P;../../ExecuteWithRedirection.cmake;--"
162172
)

0 commit comments

Comments
 (0)