CMake/Tests/RunCMake/ctest_cmake_error/RunCMakeTest.cmake
Bill Hoffman d328dc6853 CTest: Add CAPTURE_CMAKE_ERROR val to ctest_* commands
If a `ctest_*` command has CAPTURE_CMAKE_ERROR then any errors generated
by cmake during that command will cause the value to be assigned `-1`.
This will prevent a `ctest -S` script from returning non-zero unless the
script explicitly calls `message(FATAL_ERROR)`.
2016-09-20 13:14:20 -04:00

11 lines
249 B
CMake

include(RunCTest)
set(CASE_CTEST_COVERAGE_ARGS "")
function(run_ctest_coverage CASE_NAME)
set(CASE_CTEST_COVERAGE_ARGS "${ARGN}")
run_ctest(${CASE_NAME})
endfunction()
run_ctest_coverage(CTestCaptureErrorNonZero junk CAPTURE_CMAKE_ERROR val)