2017-06-16 16:20:51 +00:00
|
|
|
# 'clickhouse' binary is a multi purpose tool,
|
|
|
|
# that contain multiple execution modes (client, server, etc.)
|
|
|
|
# each of them is built and linked as a separate library, defined below.
|
|
|
|
|
2016-10-31 19:54:49 +00:00
|
|
|
add_library(clickhouse-server
|
2017-08-09 14:33:07 +00:00
|
|
|
ConfigReloader.cpp
|
2017-04-01 07:20:54 +00:00
|
|
|
HTTPHandler.cpp
|
|
|
|
InterserverIOHTTPHandler.cpp
|
|
|
|
MetricsTransmitter.cpp
|
2017-08-09 14:33:07 +00:00
|
|
|
NotFoundHandler.cpp
|
|
|
|
PingRequestHandler.cpp
|
|
|
|
ReplicasStatusHandler.cpp
|
|
|
|
RootRequestHandler.cpp
|
|
|
|
Server.cpp
|
2017-04-01 07:20:54 +00:00
|
|
|
StatusFile.cpp
|
2017-08-09 14:33:07 +00:00
|
|
|
TCPHandler.cpp
|
|
|
|
)
|
|
|
|
|
2017-11-24 18:08:01 +00:00
|
|
|
target_link_libraries(clickhouse-server clickhouse_common_io daemon clickhouse_storages_system clickhouse_functions clickhouse_aggregate_functions clickhouse_table_functions)
|
2017-06-23 20:22:35 +00:00
|
|
|
target_include_directories (clickhouse-server PUBLIC ${ClickHouse_SOURCE_DIR}/libs/libdaemon/include)
|
2016-02-07 21:58:58 +00:00
|
|
|
|
2016-10-31 19:54:49 +00:00
|
|
|
add_library(clickhouse-local LocalServer.cpp)
|
2017-11-24 18:08:01 +00:00
|
|
|
target_link_libraries(clickhouse-local clickhouse-server clickhouse_functions clickhouse_aggregate_functions clickhouse_table_functions)
|
2016-02-07 21:58:58 +00:00
|
|
|
|
2017-11-24 18:08:01 +00:00
|
|
|
add_library(clickhouse-extract-from-config ${SPLIT_SHARED} ExtractFromConfig.cpp)
|
|
|
|
target_link_libraries(clickhouse-extract-from-config clickhouse_common_io ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
2017-03-24 15:05:54 +00:00
|
|
|
|
2017-06-16 16:20:51 +00:00
|
|
|
add_library (clickhouse-client Client.cpp)
|
2017-11-24 18:08:01 +00:00
|
|
|
target_link_libraries (clickhouse-client clickhouse_functions clickhouse_aggregate_functions ${LINE_EDITING_LIBS} ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
2017-06-16 16:20:51 +00:00
|
|
|
install (FILES clickhouse-client.xml DESTINATION ${CLICKHOUSE_ETC_DIR}/clickhouse-client COMPONENT clickhouse-client RENAME config.xml)
|
|
|
|
|
2017-11-24 18:08:01 +00:00
|
|
|
add_library (clickhouse-benchmark ${SPLIT_SHARED} Benchmark.cpp)
|
|
|
|
target_link_libraries (clickhouse-benchmark clickhouse_common_io ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
2017-09-08 23:58:42 +00:00
|
|
|
target_include_directories (clickhouse-benchmark PRIVATE ${PCG_RANDOM_INCLUDE_DIR})
|
2017-06-16 16:20:51 +00:00
|
|
|
|
2017-11-24 18:08:01 +00:00
|
|
|
add_library (clickhouse-performance-test ${SPLIT_SHARED} PerformanceTest.cpp)
|
|
|
|
target_link_libraries (clickhouse-performance-test clickhouse_common_io ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
2017-09-08 23:58:42 +00:00
|
|
|
target_include_directories (clickhouse-performance-test PRIVATE ${PCG_RANDOM_INCLUDE_DIR})
|
2017-06-16 16:20:51 +00:00
|
|
|
|
2017-11-24 18:08:01 +00:00
|
|
|
add_library (clickhouse-compressor-lib ${SPLIT_SHARED} Compressor.cpp)
|
|
|
|
target_link_libraries (clickhouse-compressor-lib clickhouse_common_io ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
2017-09-20 14:12:12 +00:00
|
|
|
|
2017-11-24 18:08:01 +00:00
|
|
|
add_library (clickhouse-format ${SPLIT_SHARED} Format.cpp)
|
|
|
|
target_link_libraries (clickhouse-format clickhouse_common_io ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
2017-11-11 01:04:14 +00:00
|
|
|
|
2017-11-12 17:08:52 +00:00
|
|
|
if (USE_EMBEDDED_COMPILER)
|
|
|
|
link_directories (${LLVM_LIBRARY_DIRS})
|
|
|
|
endif ()
|
|
|
|
|
2017-10-24 19:18:15 +00:00
|
|
|
add_executable(clickhouse main.cpp)
|
|
|
|
target_include_directories(clickhouse BEFORE PRIVATE ${COMMON_INCLUDE_DIR})
|
|
|
|
target_link_libraries(clickhouse
|
2017-04-01 07:20:54 +00:00
|
|
|
clickhouse-server
|
|
|
|
clickhouse-client
|
|
|
|
clickhouse-local
|
|
|
|
clickhouse-benchmark
|
2017-01-13 18:22:13 +00:00
|
|
|
clickhouse-performance-test
|
2017-09-20 14:12:12 +00:00
|
|
|
clickhouse-extract-from-config
|
2017-11-11 01:04:14 +00:00
|
|
|
clickhouse-compressor-lib
|
2017-11-24 18:08:01 +00:00
|
|
|
clickhouse-format
|
|
|
|
dbms
|
|
|
|
)
|
2017-11-12 12:58:40 +00:00
|
|
|
|
|
|
|
if (USE_EMBEDDED_COMPILER)
|
2017-12-08 08:28:08 +00:00
|
|
|
add_subdirectory ("Compiler-${LLVM_VERSION}")
|
2017-11-12 12:58:40 +00:00
|
|
|
target_link_libraries (clickhouse clickhouse-compiler)
|
|
|
|
endif ()
|
|
|
|
|
2017-04-10 17:43:30 +00:00
|
|
|
INSTALL(TARGETS clickhouse RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clickhouse)
|
2016-11-11 17:01:02 +00:00
|
|
|
# make symbolic links to concrete clickhouse applications
|
2016-11-14 15:29:33 +00:00
|
|
|
macro(install_symlink_to_clickhouse app)
|
2017-04-11 21:02:15 +00:00
|
|
|
INSTALL(CODE "execute_process(COMMAND ln -sf clickhouse ${app} WORKING_DIRECTORY \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}\" )" COMPONENT ${app})
|
2016-11-14 19:14:11 +00:00
|
|
|
endmacro(install_symlink_to_clickhouse)
|
2016-11-14 15:29:33 +00:00
|
|
|
|
|
|
|
install_symlink_to_clickhouse(clickhouse-server)
|
|
|
|
install_symlink_to_clickhouse(clickhouse-client)
|
|
|
|
install_symlink_to_clickhouse(clickhouse-local)
|
|
|
|
install_symlink_to_clickhouse(clickhouse-benchmark)
|
2017-01-13 18:22:13 +00:00
|
|
|
install_symlink_to_clickhouse(clickhouse-performance-test)
|
2017-11-11 01:04:14 +00:00
|
|
|
install_symlink_to_clickhouse(clickhouse-format)
|
2017-11-21 21:22:18 +00:00
|
|
|
install_symlink_to_clickhouse(clickhouse-clang)
|
|
|
|
install_symlink_to_clickhouse(clickhouse-lld)
|
2017-11-12 12:58:40 +00:00
|
|
|
|
2016-02-08 21:20:55 +00:00
|
|
|
INSTALL(
|
2017-04-01 07:20:54 +00:00
|
|
|
FILES config.xml users.xml
|
|
|
|
DESTINATION ${CLICKHOUSE_ETC_DIR}/clickhouse-server
|
|
|
|
COMPONENT clickhouse)
|