mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
20 lines
711 B
CMake
20 lines
711 B
CMake
# Adding test output on failure
|
|
enable_testing ()
|
|
|
|
if (NOT TARGET check)
|
|
if (CMAKE_CONFIGURATION_TYPES)
|
|
add_custom_target (check COMMAND ${CMAKE_CTEST_COMMAND}
|
|
--force-new-ctest-process --output-on-failure --build-config "$<CONFIGURATION>"
|
|
WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
|
|
else ()
|
|
add_custom_target (check COMMAND ${CMAKE_CTEST_COMMAND}
|
|
--force-new-ctest-process --output-on-failure
|
|
WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
|
|
endif ()
|
|
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)
|