Tests: Fix re-running CTestCoverageCollectGCOV on in-source build

Do not remove the test binary directory if it contains `CMakeCache.txt`.
Otherwise in an in-source build we remove the source directory too.
This commit is contained in:
Brad King
2020-04-30 08:40:33 -04:00
parent ab7eda2591
commit 81e83510a0

View File

@@ -3,8 +3,6 @@ set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestCoverageCollectGCOV/Te
set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestCoverageCollectGCOV/TestProject")
set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
ctest_start(Experimental)
ctest_configure()
ctest_build()