6 #! SIMPLE_TEST(<testname> [argument1 ...])
9 #! This macro add a test using the complete add_test signature specifying target using
10 #! $<TARGET_FILE:...> generator expression. Optionnal test argument(s) can be passed
11 #! after specifying the <testname>.
13 #! Variable named KIT is expected to be defined in the current scope. KIT variable usually
14 #! matches the value of PROJECT_NAME.
16 #! The macro also associates a label to the test based on the current value of KIT.
18 #! \sa http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:add_test
19 #! \sa http://www.cmake.org/cmake/help/cmake-2-8-docs.html#variable:PROJECT_NAME
21 #! \ingroup CMakeUtilities
22 macro(SIMPLE_TEST testname)
23 if("${KIT}" STREQUAL "")
24 message(FATAL_ERROR "error: KIT variable is not set !")
27 if(NOT TARGET ${KIT}CppTests)
28 message(FATAL_ERROR "error: ${KIT}CppTests target does NOT exist !")
31 add_test(NAME ${testname} COMMAND $<TARGET_FILE:${KIT}CppTests> ${testname} ${ARGN})
32 set_property(TEST ${testname} PROPERTY LABELS ${KIT})