diff options
author | Brad King <brad.king@kitware.com> | 2017-06-01 17:40:03 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-06-01 17:40:47 (GMT) |
commit | 860db083cafb1337147923f7dd21b57767abbee3 (patch) | |
tree | fea1a13e782087d9699998de11a2f321769c2103 /Tests/CMakeLists.txt | |
parent | c80148c77e552a43b0648bad02de86e6b6d2b61d (diff) | |
parent | 3c1ecb5214afa45a44742ad2b1e24517925e858a (diff) | |
download | CMake-860db083cafb1337147923f7dd21b57767abbee3.zip CMake-860db083cafb1337147923f7dd21b57767abbee3.tar.gz CMake-860db083cafb1337147923f7dd21b57767abbee3.tar.bz2 |
Merge topic 'add-common-record-features-macros'
3c1ecb52 Intel: Fix missing C std default for 12.0 <= ver < 12.1
f70b0bb3 SunPro: Make sure all known versions get CXX98 defaults
220ede74 GNU: Fix language defaults for 3.4
a40e6ba8 Clang: Fix language defaults for 2.1
9b112a84 Compilers: Port to use default cmake_record_lang_compile_features macros
37221529 MSVC: Add empty definitions for std compile options
e556f1b9 CompileFeatures: Makes tests work with meta-feature only
20ffa147 Tests: Allow test macro to take no executable arguments
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !833
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 2c05789..d138f58 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1,6 +1,9 @@ # a macro for tests that have a simple format where the name matches the # directory and project -macro(ADD_TEST_MACRO NAME COMMAND) +macro(ADD_TEST_MACRO NAME) + if(${ARGC} GREATER 1) + set(_test_command --test-command ${ARGN}) + endif() string(REPLACE "." "/" dir "${NAME}") string(REGEX REPLACE "[^.]*\\." "" proj "${NAME}") add_test(NAME "${NAME}" COMMAND "${CMAKE_CTEST_COMMAND}" @@ -13,7 +16,8 @@ macro(ADD_TEST_MACRO NAME COMMAND) ${${NAME}_CTEST_OPTIONS} --build-options ${build_options} ${${NAME}_BUILD_OPTIONS} - --test-command ${COMMAND} ${ARGN}) + ${_test_command}) + unset(_test_command) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${dir}") endmacro() @@ -271,7 +275,7 @@ if(BUILD_TESTING) ADD_TEST_MACRO(SystemInformation SystemInformation) ADD_TEST_MACRO(MathTest MathTest) ADD_TEST_MACRO(CompileFeatures CompileFeatures) - ADD_TEST_MACRO(CMakeCommands.target_compile_features target_compile_features) + ADD_TEST_MACRO(CMakeCommands.target_compile_features) if(CMake_TEST_RESOURCES) ADD_TEST_MACRO(VSResource VSResource) |