2011-07-16 09:09:01 +02:00
|
|
|
|
2015-11-20 13:41:22 +01:00
|
|
|
INCLUDE(CMakeParseArguments)
|
2011-07-16 09:09:01 +02:00
|
|
|
|
|
|
|
MACRO(MY_ADD_TEST name)
|
|
|
|
ADD_TEST(${name} ${name}-t)
|
|
|
|
ENDMACRO()
|
|
|
|
|
2015-11-20 13:14:33 +01:00
|
|
|
MACRO(MY_ADD_TESTS)
|
2015-11-20 13:41:22 +01:00
|
|
|
CMAKE_PARSE_ARGUMENTS(ARG "" "EXT" "LINK_LIBRARIES" ${ARGN})
|
2011-07-16 09:09:01 +02:00
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
|
|
|
|
${CMAKE_SOURCE_DIR}/unittest/mytap)
|
|
|
|
|
|
|
|
IF (NOT ARG_EXT)
|
|
|
|
SET(ARG_EXT "c")
|
|
|
|
ENDIF()
|
|
|
|
|
2015-11-20 13:41:22 +01:00
|
|
|
FOREACH(name ${ARG_UNPARSED_ARGUMENTS})
|
2011-07-16 09:09:01 +02:00
|
|
|
ADD_EXECUTABLE(${name}-t "${name}-t.${ARG_EXT}")
|
|
|
|
TARGET_LINK_LIBRARIES(${name}-t mytap ${ARG_LINK_LIBRARIES})
|
|
|
|
MY_ADD_TEST(${name})
|
|
|
|
ENDFOREACH()
|
|
|
|
ENDMACRO()
|
|
|
|
|