ClickHouse/cmake/add_check.cmake
proller 9bbe8fe5c4 Dynamic library mode (#471)
* Cmake: UNBUNDLED option

* Dynamic library mode
2017-02-08 22:53:00 +04:00

16 lines
526 B
CMake

# Adding test output on failure
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 ()
macro (add_check target)
add_test (NAME test_${target} COMMAND ${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
#add_dependencies (check ${target})
endmacro (add_check)