blob: 4347a92d3062381253dc0f6bb7004ce6e4a5cd23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# a macro for tests that have a simple format where the name matches the
# directory and project
macro(ADD_TEST_MACRO NAME COMMAND)
string(REPLACE "." "/" dir "${NAME}")
string(REGEX REPLACE "[^.]*\\." "" proj "${NAME}")
add_test(${NAME} ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMAKE_SOURCE_DIR}/tests/${dir}"
"${CMAKE_BINARY_DIR}/tests/${dir}"
--build-two-config
--build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-project ${proj}
${${NAME}_EXTRA_OPTIONS}
--test-command ${COMMAND} ${ARGN})
# list(APPEND TEST_BUILD_DIRS "${CMAKE_BINARY_DIR}/tests/${dir}")
endmacro(ADD_TEST_MACRO)
add_test_macro(ExecuteAllModules ExecuteAllModules)
|