ClickHouse/dbms/src/Functions/CMakeLists.txt

84 lines
2.7 KiB
CMake
Raw Normal View History

2017-04-21 17:47:27 +00:00
include(${ClickHouse_SOURCE_DIR}/cmake/dbms_glob_sources.cmake)
include(${ClickHouse_SOURCE_DIR}/cmake/dbms_generate_function.cmake)
set (FUNCTIONS_GENERATED_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated/)
generate_function_register(Arithmetic
2018-05-07 02:01:11 +00:00
FunctionPlus
FunctionMinus
FunctionMultiply
FunctionDivideFloating
FunctionDivideIntegral
FunctionDivideIntegralOrZero
FunctionModulo
FunctionNegate
FunctionAbs
FunctionBitAnd
FunctionBitOr
FunctionBitXor
FunctionBitNot
FunctionBitShiftLeft
FunctionBitShiftRight
FunctionBitRotateLeft
FunctionBitRotateRight
FunctionLeast
FunctionGreatest
FunctionBitTest
FunctionBitTestAny
FunctionBitTestAll
FunctionGCD
FunctionLCM
FunctionIntExp2
FunctionIntExp10
)
2018-04-24 07:16:39 +00:00
generate_function_register(Projection
2018-05-07 02:01:11 +00:00
FunctionOneOrZero
FunctionProject
FunctionBuildProjectionComposition
FunctionRestoreProjection
2018-04-24 07:16:39 +00:00
)
2017-04-21 17:47:27 +00:00
add_headers_and_sources(clickhouse_functions .)
add_headers_and_sources(clickhouse_functions ./GatherUtils)
2017-04-21 17:47:27 +00:00
add_headers_and_sources(clickhouse_functions ./Conditional)
#add_headers_and_sources(clickhouse_functions ${ClickHouse_BINARY_DIR}/dbms/src/Functions)
add_headers_and_sources(clickhouse_functions ${FUNCTIONS_GENERATED_DIR})
2017-04-21 17:47:27 +00:00
list(REMOVE_ITEM clickhouse_functions_sources IFunction.cpp FunctionFactory.cpp FunctionHelpers.cpp)
list(REMOVE_ITEM clickhouse_functions_headers IFunction.h FunctionFactory.h FunctionHelpers.h)
2017-04-21 17:47:27 +00:00
2017-11-24 18:08:01 +00:00
add_library(clickhouse_functions ${clickhouse_functions_sources})
target_link_libraries(clickhouse_functions PUBLIC dbms PRIVATE ${CONSISTENT_HASHING_LIBRARY} consistent-hashing-sumbur ${FARMHASH_LIBRARIES} ${METROHASH_LIBRARIES} murmurhash)
target_include_directories (clickhouse_functions SYSTEM BEFORE PUBLIC ${DIVIDE_INCLUDE_DIR})
2017-04-21 17:47:27 +00:00
if (CONSISTENT_HASHING_INCLUDE_DIR)
target_include_directories (clickhouse_functions PRIVATE ${CONSISTENT_HASHING_INCLUDE_DIR})
endif ()
if (CMAKE_BUILD_TYPE_UC STREQUAL "RELEASE" OR CMAKE_BUILD_TYPE_UC STREQUAL "RELWITHDEBINFO" OR CMAKE_BUILD_TYPE_UC STREQUAL "MINSIZEREL")
# Won't generate debug info for files with heavy template instantiation to achieve faster linking and lower size.
target_compile_options(clickhouse_functions PRIVATE "-g0")
endif ()
2018-01-19 17:04:32 +00:00
if (USE_ICU)
#target_link_libraries (clickhouse_functions ${ICU_LIBS})
target_include_directories (clickhouse_functions SYSTEM PRIVATE ${ICU_INCLUDE_DIR})
2018-01-19 17:04:32 +00:00
endif ()
if (USE_VECTORCLASS)
target_include_directories (clickhouse_functions SYSTEM BEFORE PUBLIC ${VECTORCLASS_INCLUDE_DIR})
endif ()
2016-12-01 22:44:59 +00:00
if (ENABLE_TESTS)
add_subdirectory (tests)
endif ()
if (USE_EMBEDDED_COMPILER)
target_include_directories (clickhouse_functions SYSTEM BEFORE PUBLIC ${LLVM_INCLUDE_DIRS})
endif ()