summaryrefslogtreecommitdiff
path: root/Tests/CMakeBuildTest.cmake.in
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-10-18 10:31:16 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2008-10-18 10:31:16 -0400
commit407a2bc7370ed9984ddfec8fc816631c0a4b650f (patch)
tree104eeec6f2b884c0c31ed0a2f0a4498f9974b0a1 /Tests/CMakeBuildTest.cmake.in
parentddf36eb3cf220d32c4d5c91f9231edfa80868912 (diff)
downloadcmake-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.in6
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}"