summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeCommands
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-02-28 16:34:10 (GMT)
committerBrad King <brad.king@kitware.com>2012-02-28 16:34:10 (GMT)
commit5e1a5c44da395f8b2c121789e81f4a360a4088bc (patch)
tree795f42c91214bb545bfa7ab76fdf70789dc31a73 /Tests/CMakeCommands
parentd03606a19cc05872baf23269ae8ec61d2e0719e8 (diff)
downloadCMake-5e1a5c44da395f8b2c121789e81f4a360a4088bc.zip
CMake-5e1a5c44da395f8b2c121789e81f4a360a4088bc.tar.gz
CMake-5e1a5c44da395f8b2c121789e81f4a360a4088bc.tar.bz2
Add infrastructure for CMakeCommands tests
Generalize the build_command test framework as a macro to add the test. Process the CMakeCommands subdirectory explicitly.
Diffstat (limited to 'Tests/CMakeCommands')
-rw-r--r--Tests/CMakeCommands/CMakeLists.txt10
-rw-r--r--Tests/CMakeCommands/build_command/test.cmake (renamed from Tests/CMakeCommands/build_command/RunCMake.cmake)0
2 files changed, 10 insertions, 0 deletions
diff --git a/Tests/CMakeCommands/CMakeLists.txt b/Tests/CMakeCommands/CMakeLists.txt
new file mode 100644
index 0000000..e9e4020
--- /dev/null
+++ b/Tests/CMakeCommands/CMakeLists.txt
@@ -0,0 +1,10 @@
+macro(add_CMakeCommands_test test)
+ add_test(CMakeCommands.${test} ${CMAKE_CMAKE_COMMAND}
+ -DCMake_SOURCE_DIR=${CMake_SOURCE_DIR} # TODO: Remove
+ -Ddir=${CMAKE_CURRENT_BINARY_DIR}/${test}
+ -Dgen=${CMAKE_TEST_GENERATOR}
+ -P "${CMAKE_CURRENT_SOURCE_DIR}/${test}/test.cmake"
+ )
+endmacro()
+
+add_CMakeCommands_test(build_command)
diff --git a/Tests/CMakeCommands/build_command/RunCMake.cmake b/Tests/CMakeCommands/build_command/test.cmake
index 55d9359..55d9359 100644
--- a/Tests/CMakeCommands/build_command/RunCMake.cmake
+++ b/Tests/CMakeCommands/build_command/test.cmake