summaryrefslogtreecommitdiffstats
path: root/Tests/CTestTestRunScript
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2009-10-28 18:11:19 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2009-10-28 18:11:19 (GMT)
commit5eb4372001b63c7fba90c939d73b0ffdaf427a48 (patch)
tree320618bc2307fcebd57f3011eef177e350d95959 /Tests/CTestTestRunScript
parent28c3d59ed930976fd5ac4b5ea4f595632ef54758 (diff)
downloadCMake-5eb4372001b63c7fba90c939d73b0ffdaf427a48.zip
CMake-5eb4372001b63c7fba90c939d73b0ffdaf427a48.tar.gz
CMake-5eb4372001b63c7fba90c939d73b0ffdaf427a48.tar.bz2
Changed RunScript test to be in-source build safe
Diffstat (limited to 'Tests/CTestTestRunScript')
-rw-r--r--Tests/CTestTestRunScript/hello.cmake.in6
-rw-r--r--Tests/CTestTestRunScript/test.cmake.in7
2 files changed, 13 insertions, 0 deletions
diff --git a/Tests/CTestTestRunScript/hello.cmake.in b/Tests/CTestTestRunScript/hello.cmake.in
new file mode 100644
index 0000000..e2c652c
--- /dev/null
+++ b/Tests/CTestTestRunScript/hello.cmake.in
@@ -0,0 +1,6 @@
+GET_FILENAME_COMPONENT(CTEST_COMMAND "${CMAKE_COMMAND}" PATH)
+SET(CTEST_COMMAND "${CTEST_COMMAND}/ctest")
+SET(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestRunScript")
+SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestRunScript")
+
+message("hello world")
diff --git a/Tests/CTestTestRunScript/test.cmake.in b/Tests/CTestTestRunScript/test.cmake.in
new file mode 100644
index 0000000..4afcdd9
--- /dev/null
+++ b/Tests/CTestTestRunScript/test.cmake.in
@@ -0,0 +1,7 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.1)
+GET_FILENAME_COMPONENT(CTEST_COMMAND "${CMAKE_COMMAND}" PATH)
+SET(CTEST_COMMAND "${CTEST_COMMAND}/ctest")
+SET(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestRunScript")
+SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestRunScript")
+
+CTEST_RUN_SCRIPT("${CTEST_BINARY_DIRECTORY}/hello.cmake")