summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt10
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)