summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-11-01 18:26:21 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-11-01 18:26:21 (GMT)
commitc2300e6265400089b8efb5e34e4d33e1425354ac (patch)
tree24175319d47f85e3885064d12143b93aaaf680ca /Tests/CMakeLists.txt
parente0d97b672875ab83e4e30ddd00746860e6e1fd87 (diff)
parent76ecdd8d169fd2565466669875b5ed7e7c5c1963 (diff)
downloadCMake-c2300e6265400089b8efb5e34e4d33e1425354ac.zip
CMake-c2300e6265400089b8efb5e34e4d33e1425354ac.tar.gz
CMake-c2300e6265400089b8efb5e34e4d33e1425354ac.tar.bz2
Merge topic 'fix-12539-ctestconfig-from-build-dir'
76ecdd8 CTest: Look for CTestConfig.cmake in build dir first, then source dir
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 78db39d..21d1196 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1531,6 +1531,35 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
SET_TESTS_PROPERTIES(CTestTestUpload PROPERTIES
PASS_REGULAR_EXPRESSION "Upload\\.xml")
+ CONFIGURE_FILE(
+ "${CMake_SOURCE_DIR}/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir1/test1.cmake"
+ @ONLY ESCAPE_QUOTES)
+ ADD_TEST(CTestTestConfigFileInBuildDir1 ${CMAKE_CTEST_COMMAND}
+ -S "${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir1/test1.cmake" -V
+ --output-log "${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir1/testOut1.log"
+ )
+ SET_TESTS_PROPERTIES(CTestTestConfigFileInBuildDir1 PROPERTIES DEPENDS CTestTestNoBuild
+ PASS_REGULAR_EXPRESSION
+ "Reading ctest configuration file: ${CMake_SOURCE_DIR}.Tests.CTestTestConfigFileInBuildDir.CTestConfig.cmake")
+
+ CONFIGURE_FILE(
+ "${CMake_SOURCE_DIR}/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir2/test2.cmake"
+ @ONLY ESCAPE_QUOTES)
+ CONFIGURE_FILE(
+ "${CMake_SOURCE_DIR}/Tests/CTestTestConfigFileInBuildDir/CTestConfig.cmake"
+ "${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir2/CTestConfig.cmake"
+ @ONLY ESCAPE_QUOTES COPYONLY)
+ ADD_TEST(CTestTestConfigFileInBuildDir2 ${CMAKE_CTEST_COMMAND}
+ -S "${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir2/test2.cmake" -V
+ --output-log "${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir2/testOut2.log"
+ )
+ SET_TESTS_PROPERTIES(CTestTestConfigFileInBuildDir2 PROPERTIES DEPENDS CTestTestNoBuild
+ REQUIRED_FILES ${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir2/CTestConfig.cmake
+ PASS_REGULAR_EXPRESSION
+ "Reading ctest configuration file: ${CMake_BINARY_DIR}.Tests.CTestTestConfigFileInBuildDir2.CTestConfig.cmake")
+
# Use macro, not function so that build can still be driven by CMake 2.4.
# After 2.6 is required, this could be a function without the extra 'set'
# calls.