diff options
author | Brad King <brad.king@kitware.com> | 2018-11-26 13:05:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-11-26 13:05:13 (GMT) |
commit | d9195ab081b9c23a96d5a9c1b8e8be4da4f6e976 (patch) | |
tree | 777060262f5f343c596ef1fbd5cdd475865839b3 | |
parent | 1ca53f5ef1335561d952603d48c48da549d41271 (diff) | |
download | CMake-d9195ab081b9c23a96d5a9c1b8e8be4da4f6e976.zip CMake-d9195ab081b9c23a96d5a9c1b8e8be4da4f6e976.tar.gz CMake-d9195ab081b9c23a96d5a9c1b8e8be4da4f6e976.tar.bz2 |
Tests: Teach run_ctest to handle removal of CTestConfig.cmake
When running tests in a non-fresh build tree there may be files left
from previous test runs. In the case that a test removes
`CTestConfig.cmake.in`, we must remove any `CTestConfig.cmake` that
may have been left behind.
-rw-r--r-- | Tests/RunCMake/RunCTest.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Tests/RunCMake/RunCTest.cmake b/Tests/RunCMake/RunCTest.cmake index c2c31d1..98fdf20 100644 --- a/Tests/RunCMake/RunCTest.cmake +++ b/Tests/RunCMake/RunCTest.cmake @@ -6,6 +6,8 @@ function(run_ctest CASE_NAME) if(EXISTS "${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in") configure_file(${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in ${RunCMake_BINARY_DIR}/${CASE_NAME}/CTestConfig.cmake @ONLY) + else() + file(REMOVE ${RunCMake_BINARY_DIR}/${CASE_NAME}/CTestConfig.cmake) endif() configure_file(${RunCMake_SOURCE_DIR}/CMakeLists.txt.in ${RunCMake_BINARY_DIR}/${CASE_NAME}/CMakeLists.txt @ONLY) |