diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-10-18 10:31:16 -0400 |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-10-18 10:31:16 -0400 |
commit | 407a2bc7370ed9984ddfec8fc816631c0a4b650f (patch) | |
tree | 104eeec6f2b884c0c31ed0a2f0a4498f9974b0a1 /Tests/CMakeBuildTest.cmake.in | |
parent | ddf36eb3cf220d32c4d5c91f9231edfa80868912 (diff) | |
download | cmake-407a2bc7370ed9984ddfec8fc816631c0a4b650f.tar.gz |
ENH: fix test to work with in-source testing of CMake
Diffstat (limited to 'Tests/CMakeBuildTest.cmake.in')
-rw-r--r-- | Tests/CMakeBuildTest.cmake.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/CMakeBuildTest.cmake.in b/Tests/CMakeBuildTest.cmake.in index b8c7791bc6..ebba702f73 100644 --- a/Tests/CMakeBuildTest.cmake.in +++ b/Tests/CMakeBuildTest.cmake.in @@ -1,6 +1,12 @@ # create the binary directory make_directory("@CMAKE_BUILD_TEST_BINARY_DIR@") +# remove the CMakeCache.txt file from the source dir +# if there is one, so that in-source cmake tests +# still pass +message("Remove: @CMAKE_BUILD_TEST_SOURCE_DIR@/CMakeCache.txt") +file(REMOVE "@CMAKE_BUILD_TEST_SOURCE_DIR@/CMakeCache.txt") + # run cmake in the binary directory message("running: ${CMAKE_COMMAND}") execute_process(COMMAND "${CMAKE_COMMAND}" |