2014-01-16 12:39:28 +00:00
|
|
|
# добавляем вывод программы при ошибке теста
|
|
|
|
enable_testing()
|
|
|
|
if (CMAKE_CONFIGURATION_TYPES)
|
|
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}
|
|
|
|
--force-new-ctest-process --output-on-failure
|
|
|
|
--build-config "$<CONFIGURATION>")
|
|
|
|
else()
|
|
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}
|
|
|
|
--force-new-ctest-process --output-on-failure)
|
|
|
|
endif()
|
2015-04-20 11:35:55 +00:00
|
|
|
|
|
|
|
macro (add_check target)
|
2015-05-18 12:18:25 +00:00
|
|
|
add_test(NAME test_${target} COMMAND ${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
2015-04-20 11:35:55 +00:00
|
|
|
add_dependencies(check ${target})
|
|
|
|
endmacro (add_check)
|