mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-28 09:59:20 -05:00
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:
@@ -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)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user