summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CompileWarningAsError/RunCMakeTest.cmake
blob: 059c80f0b2e001ecb5be24d9d38e62196895bfd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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(${test})
  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)