diff options
author | David Cole <david.cole@kitware.com> | 2011-02-01 20:37:25 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-02-01 20:39:02 (GMT) |
commit | 816c9d1aa1f2b42d40c81a991b68c96eb12b6d26 (patch) | |
tree | 69ddcc4455774f6f622d6f77e210a6ae1e36aa2d /Modules/CTestTargets.cmake | |
parent | 4f1e1fe7821da7d5af17d18f031f72daa05c89e1 (diff) | |
download | CMake-816c9d1aa1f2b42d40c81a991b68c96eb12b6d26.zip CMake-816c9d1aa1f2b42d40c81a991b68c96eb12b6d26.tar.gz CMake-816c9d1aa1f2b42d40c81a991b68c96eb12b6d26.tar.bz2 |
CTest: Add alias for make test target (#4564)
Clients may define CTEST_TEST_TARGET_ALIAS in a project's
initial cache to get a target of another name that executes
the same underlying command as "make test"
Diffstat (limited to 'Modules/CTestTargets.cmake')
-rw-r--r-- | Modules/CTestTargets.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/CTestTargets.cmake b/Modules/CTestTargets.cmake index e3ef86c..d66874d 100644 --- a/Modules/CTestTargets.cmake +++ b/Modules/CTestTargets.cmake @@ -84,4 +84,12 @@ IF(NOT _CTEST_TARGETS_ADDED) ENDFOREACH(testtype) ENDFOREACH(mode) ENDIF("${CMAKE_GENERATOR}" MATCHES Make) + + # If requested, add an alias that is the equivalent of the built-in "test" + # or "RUN_TESTS" target: + IF(CTEST_TEST_TARGET_ALIAS) + ADD_CUSTOM_TARGET(${CTEST_TEST_TARGET_ALIAS} + ${CMAKE_CTEST_COMMAND} ${__conf_types} + ) + ENDIF() ENDIF(NOT _CTEST_TARGETS_ADDED) |