summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/CompileWarningAsError/RunCMakeTest.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/CompileWarningAsError/RunCMakeTest.cmake b/Tests/RunCMake/CompileWarningAsError/RunCMakeTest.cmake
index 392c921..18df14c 100644
--- a/Tests/RunCMake/CompileWarningAsError/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompileWarningAsError/RunCMakeTest.cmake
@@ -5,6 +5,10 @@ function(run_compile_warn test lang extension)
set(RunCMake_TEST_OUTPUT_MERGE 1)
run_cmake_with_options(${test}_${lang} "-DLANGUAGE=${lang}" "-DEXTENSION=${extension}" ${ARGN})
set(RunCMake_TEST_NO_CLEAN 1)
+ if(ARGN MATCHES "--compile-no-warning-as-error")
+ # Cause the build system to re-run CMake to verify that this option is preserved.
+ run_cmake_command(${test}_${lang}-Touch ${CMAKE_COMMAND} -E touch_nocreate CMakeCache.txt)
+ endif()
run_cmake_command(${test}_${lang}-Build ${CMAKE_COMMAND} --build . ${verbose_args})
endfunction()