Files
CMake/Tests/RunCMake/CompileWarningAsError/RunCMakeTest.cmake
Martin Duffy 65f7053d6c COMPILE_WARNING_AS_ERROR: Add command-line option
Add command-line option `--compile-no-warning-as-error` to ignore value of
`COMPILE_WARNING_AS_ERROR`.

Issue: #19085
2022-05-18 10:30:30 -04:00

14 lines
443 B
CMake

include(RunCMake)
function(run_compile_warn test)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}-build)
set(RunCMake_TEST_OUTPUT_MERGE 1)
run_cmake_with_options(${test} ${ARGN})
set(RunCMake_TEST_NO_CLEAN 1)
run_cmake_command(${test}-Build ${CMAKE_COMMAND} --build . ${verbose_args})
endfunction()
run_compile_warn(WerrorOn)
run_compile_warn(WerrorOff)
run_compile_warn(WerrorOnIgnore "--compile-no-warning-as-error")