Tests: Use add_test(NAME) signature in add_test_macro

This will allow generator expressions to be used in test arguments.
This commit is contained in:
Ben Boeckel 2014-07-01 10:24:47 -04:00 committed by Brad King
parent 623123aaa0
commit 902c90636e
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
macro(ADD_TEST_MACRO NAME COMMAND)
string(REPLACE "." "/" dir "${NAME}")
string(REGEX REPLACE "[^.]*\\." "" proj "${NAME}")
add_test(${NAME} ${CMAKE_CTEST_COMMAND}
add_test(NAME "${NAME}" COMMAND "${CMAKE_CTEST_COMMAND}"
--build-and-test
"${CMake_SOURCE_DIR}/Tests/${dir}"
"${CMake_BINARY_DIR}/Tests/${dir}"