summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CTest/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorKevin Puetz <PuetzKevinA@JohnDeere.com>2020-04-03 20:07:01 (GMT)
committerBrad King <brad.king@kitware.com>2020-08-26 15:27:05 (GMT)
commit6a6f1d1edd73902053d215ce3dc12267f05501e2 (patch)
tree9485d231fb1020279f1bc5bba862c33881bdf9be /Tests/RunCMake/CTest/RunCMakeTest.cmake
parent6cbaa8eb931950b8a834acc0c6f78a7290c4d3d9 (diff)
downloadCMake-6a6f1d1edd73902053d215ce3dc12267f05501e2.zip
CMake-6a6f1d1edd73902053d215ce3dc12267f05501e2.tar.gz
CMake-6a6f1d1edd73902053d215ce3dc12267f05501e2.tar.bz2
CTest: exit nonzero after message(SEND_ERROR|FATAL_ERROR)
Fixes: #21004
Diffstat (limited to 'Tests/RunCMake/CTest/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CTest/RunCMakeTest.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTest/RunCMakeTest.cmake b/Tests/RunCMake/CTest/RunCMakeTest.cmake
index 761224a..62606f8 100644
--- a/Tests/RunCMake/CTest/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTest/RunCMakeTest.cmake
@@ -18,3 +18,12 @@ function(run_CMakeCTestArguments)
run_cmake_command(CMakeCTestArguments-test ${CMAKE_COMMAND} --build . --config Debug --target "${test}")
endfunction()
run_CMakeCTestArguments()
+
+function(run_TestfileErrors)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TestfileErrors-build)
+ run_cmake(TestfileErrors)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(TestfileErrors-build ${CMAKE_COMMAND} --build . --config Debug)
+ run_cmake_command(TestfileErrors-test ${CMAKE_CTEST_COMMAND} -C Debug)
+endfunction()
+run_TestfileErrors()