diff options
author | Brad King <brad.king@kitware.com> | 2009-03-16 14:51:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-03-16 14:51:30 (GMT) |
commit | 9862f383d09018cd9e14a6054c03b508c0ef3afa (patch) | |
tree | b68b27adc864c2e0cfc5eab806b18b3ee223745c /Tests | |
parent | 606e6ff9cd2d1ab6a242a38e0c3f6df7167fdff8 (diff) | |
download | CMake-9862f383d09018cd9e14a6054c03b508c0ef3afa.zip CMake-9862f383d09018cd9e14a6054c03b508c0ef3afa.tar.gz CMake-9862f383d09018cd9e14a6054c03b508c0ef3afa.tar.bz2 |
ENH: Add NAME mode to ADD_TEST command
This creates command mode add_test(NAME ...). This signature is
extensible with more keyword arguments later. The main purpose is to
enable automatic replacement of target names with built target file
locations. A side effect of this feature is support for tests that only
run under specific configurations.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Testing/CMakeLists.txt | 8 | ||||
-rw-r--r-- | Tests/Testing/perconfig.c | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/Tests/Testing/CMakeLists.txt b/Tests/Testing/CMakeLists.txt index 5a15f11..462f20f 100644 --- a/Tests/Testing/CMakeLists.txt +++ b/Tests/Testing/CMakeLists.txt @@ -1,7 +1,7 @@ # # Testing # -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 2.7) PROJECT (Testing) # @@ -52,3 +52,9 @@ ADD_TEST(testing.1 ${Testing_BINARY_DIR}/bin/testing) # skip level test # ADD_SUBDIRECTORY(Sub/Sub2) + +# Per-config target name test. +ADD_EXECUTABLE(perconfig perconfig.c) +SET_PROPERTY(TARGET perconfig PROPERTY RELEASE_POSTFIX -opt) +SET_PROPERTY(TARGET perconfig PROPERTY DEBUG_POSTFIX -dbg) +ADD_TEST(NAME testing.perconfig COMMAND perconfig) diff --git a/Tests/Testing/perconfig.c b/Tests/Testing/perconfig.c new file mode 100644 index 0000000..f8b643a --- /dev/null +++ b/Tests/Testing/perconfig.c @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} |