ClickHouse/base/common/CMakeLists.txt

65 lines
1.3 KiB
CMake
Raw Normal View History

2020-02-16 08:04:03 +00:00
configure_file (config_common.h.in config_common.h)
2020-02-14 14:48:30 +00:00
2020-02-16 08:04:03 +00:00
set (SRCS
2020-02-14 14:48:30 +00:00
argsToConfig.cpp
coverage.cpp
DateLUT.cpp
DateLUTImpl.cpp
demangle.cpp
getMemoryAmount.cpp
getThreadId.cpp
JSON.cpp
LineReader.cpp
mremap.cpp
phdr_cache.cpp
preciseExp10.c
setTerminalEcho.cpp
shift10.cpp
sleep.cpp
)
if (ENABLE_REPLXX)
2020-02-16 08:04:03 +00:00
set (SRCS ${SRCS}
2020-02-14 14:48:30 +00:00
ReplxxLineReader.cpp
ReplxxLineReader.h
)
endif ()
2020-02-16 08:04:03 +00:00
add_library (common ${SRCS})
target_include_directories(common PUBLIC .. ${CMAKE_CURRENT_BINARY_DIR}/..)
2020-02-14 14:48:30 +00:00
if (USE_INTERNAL_MEMCPY)
2020-02-17 14:27:09 +00:00
target_link_libraries (common PRIVATE memcpy)
2020-02-14 14:48:30 +00:00
endif ()
if(CCTZ_INCLUDE_DIR)
target_include_directories(common BEFORE PRIVATE ${CCTZ_INCLUDE_DIR})
endif()
if (NOT USE_INTERNAL_BOOST_LIBRARY)
target_include_directories (common SYSTEM BEFORE PUBLIC ${Boost_INCLUDE_DIRS})
endif ()
if(NOT USE_INTERNAL_POCO_LIBRARY)
target_include_directories (common SYSTEM BEFORE PUBLIC ${Poco_Foundation_INCLUDE_DIR})
endif()
if(CCTZ_LIBRARY)
target_link_libraries(common PRIVATE ${CCTZ_LIBRARY})
endif()
2020-02-16 08:04:03 +00:00
target_link_libraries(common PUBLIC replxx)
2020-02-14 14:48:30 +00:00
target_link_libraries (common
2020-02-16 08:04:03 +00:00
PUBLIC
${Poco_Util_LIBRARY}
${Poco_Foundation_LIBRARY}
${CITYHASH_LIBRARIES}
${Boost_SYSTEM_LIBRARY}
)
2020-02-14 14:48:30 +00:00
if (ENABLE_TESTS)
add_subdirectory (tests)
endif ()