2017-03-22 16:59:02 +00:00
|
|
|
enable_testing()
|
2017-02-22 14:34:36 +00:00
|
|
|
|
|
|
|
# Run tests with "make check"
|
|
|
|
if (TARGET check)
|
2017-04-01 07:20:54 +00:00
|
|
|
message (STATUS "Target check already exists")
|
2017-02-22 14:34:36 +00:00
|
|
|
else ()
|
2017-04-01 07:20:54 +00:00
|
|
|
include (${ClickHouse_SOURCE_DIR}/cmake/add_check.cmake)
|
2017-02-22 14:34:36 +00:00
|
|
|
endif ()
|
|
|
|
|
2017-03-22 16:59:02 +00:00
|
|
|
|
|
|
|
# Google Test from sources
|
2017-11-24 21:15:24 +00:00
|
|
|
add_subdirectory(${ClickHouse_SOURCE_DIR}/contrib/googletest/googletest ${CMAKE_CURRENT_BINARY_DIR}/googletest)
|
2017-03-22 16:59:02 +00:00
|
|
|
# avoid problems with <regexp.h>
|
2017-08-03 12:44:39 +00:00
|
|
|
target_compile_definitions (gtest INTERFACE GTEST_HAS_POSIX_RE=0)
|
2017-03-22 16:59:02 +00:00
|
|
|
target_include_directories (gtest INTERFACE ${ClickHouse_SOURCE_DIR}/contrib/googletest/include)
|
|
|
|
|
|
|
|
|
|
|
|
macro(grep_gtest_sources BASE_DIR DST_VAR)
|
2017-04-01 07:20:54 +00:00
|
|
|
# Cold match files that are not in tests/ directories
|
|
|
|
file(GLOB_RECURSE "${DST_VAR}" RELATIVE "${BASE_DIR}" "gtest*.cpp")
|
2017-03-22 16:59:02 +00:00
|
|
|
endmacro()
|
2017-09-05 01:08:26 +00:00
|
|
|
|
2017-12-27 19:01:57 +00:00
|
|
|
install (PROGRAMS clickhouse-test DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clickhouse)
|
|
|
|
install (
|
|
|
|
DIRECTORY queries performance external_dictionaries
|
|
|
|
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/clickhouse-test
|
|
|
|
USE_SOURCE_PERMISSIONS
|
|
|
|
COMPONENT clickhouse
|
|
|
|
PATTERN "CMakeLists.txt" EXCLUDE
|
|
|
|
PATTERN ".gitignore" EXCLUDE
|
|
|
|
)
|
|
|
|
|
2017-09-05 01:08:26 +00:00
|
|
|
add_subdirectory (external_dictionaries)
|