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.
This commit is contained in:
Brad King
2009-03-16 10:51:30 -04:00
parent 606e6ff9cd
commit 9862f383d0
8 changed files with 210 additions and 6 deletions
+7 -1
View File
@@ -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)
+4
View File
@@ -0,0 +1,4 @@
int main()
{
return 0;
}