2018-11-28 11:37:12 +00:00
|
|
|
include(${ClickHouse_SOURCE_DIR}/cmake/dbms_glob_sources.cmake)
|
|
|
|
include(${ClickHouse_SOURCE_DIR}/cmake/generate_code.cmake)
|
|
|
|
|
|
|
|
add_headers_and_sources(clickhouse_dictionaries .)
|
|
|
|
|
|
|
|
generate_code(ComplexKeyCacheDictionary_generate1 UInt8 UInt16 UInt32 UInt64 UInt128 Int8 Int16 Int32 Int64 Float32 Float64 Decimal32 Decimal64 Decimal128)
|
|
|
|
generate_code(ComplexKeyCacheDictionary_generate2 UInt8 UInt16 UInt32 UInt64 UInt128 Int8 Int16 Int32 Int64 Float32 Float64 Decimal32 Decimal64 Decimal128)
|
|
|
|
generate_code(ComplexKeyCacheDictionary_generate3 UInt8 UInt16 UInt32 UInt64 UInt128 Int8 Int16 Int32 Int64 Float32 Float64 Decimal32 Decimal64 Decimal128)
|
|
|
|
generate_code(CacheDictionary_generate1 UInt8 UInt16 UInt32 UInt64 UInt128 Int8 Int16 Int32 Int64 Float32 Float64 Decimal32 Decimal64 Decimal128)
|
|
|
|
generate_code(CacheDictionary_generate2 UInt8 UInt16 UInt32 UInt64 UInt128 Int8 Int16 Int32 Int64 Float32 Float64 Decimal32 Decimal64 Decimal128)
|
|
|
|
generate_code(CacheDictionary_generate3 UInt8 UInt16 UInt32 UInt64 UInt128 Int8 Int16 Int32 Int64 Float32 Float64 Decimal32 Decimal64 Decimal128)
|
|
|
|
add_headers_and_sources(clickhouse_dictionaries ${CMAKE_CURRENT_BINARY_DIR}/generated/)
|
|
|
|
|
2019-10-22 16:47:11 +00:00
|
|
|
list(REMOVE_ITEM clickhouse_dictionaries_sources DictionaryFactory.cpp DictionarySourceFactory.cpp DictionaryStructure.cpp getDictionaryConfigurationFromAST.cpp)
|
|
|
|
list(REMOVE_ITEM clickhouse_dictionaries_headers DictionaryFactory.h DictionarySourceFactory.h DictionaryStructure.h getDictionaryConfigurationFromAST.h)
|
2019-02-15 11:46:07 +00:00
|
|
|
|
2019-04-24 09:06:28 +00:00
|
|
|
add_library(clickhouse_dictionaries ${clickhouse_dictionaries_sources})
|
2019-08-28 20:49:37 +00:00
|
|
|
target_link_libraries(clickhouse_dictionaries PRIVATE dbms clickhouse_common_io ${BTRIE_LIBRARIES})
|
2018-11-28 11:37:12 +00:00
|
|
|
|
|
|
|
if(Poco_SQL_FOUND AND NOT USE_INTERNAL_POCO_LIBRARY)
|
|
|
|
target_include_directories(clickhouse_dictionaries SYSTEM PRIVATE ${Poco_SQL_INCLUDE_DIR})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(USE_POCO_SQLODBC)
|
|
|
|
target_link_libraries(clickhouse_dictionaries PRIVATE ${Poco_SQLODBC_LIBRARY} ${Poco_SQL_LIBRARY})
|
2019-04-24 21:33:04 +00:00
|
|
|
target_include_directories(clickhouse_dictionaries SYSTEM PRIVATE ${ODBC_INCLUDE_DIRS} ${Poco_SQLODBC_INCLUDE_DIR} ${Poco_SQL_INCLUDE_DIR})
|
2018-11-28 11:37:12 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(Poco_Data_FOUND)
|
|
|
|
target_include_directories(clickhouse_dictionaries SYSTEM PRIVATE ${Poco_Data_INCLUDE_DIR})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(USE_POCO_DATAODBC)
|
|
|
|
target_link_libraries(clickhouse_dictionaries PRIVATE ${Poco_DataODBC_LIBRARY} ${Poco_Data_LIBRARY})
|
2019-04-24 21:33:04 +00:00
|
|
|
target_include_directories(clickhouse_dictionaries SYSTEM PRIVATE ${ODBC_INCLUDE_DIRS} ${Poco_DataODBC_INCLUDE_DIR})
|
2018-11-28 11:37:12 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(USE_POCO_MONGODB)
|
|
|
|
target_link_libraries(clickhouse_dictionaries PRIVATE ${Poco_MongoDB_LIBRARY})
|
|
|
|
endif()
|
|
|
|
|
2019-01-15 22:08:56 +00:00
|
|
|
if(USE_POCO_REDIS)
|
2019-02-12 09:23:22 +00:00
|
|
|
# for code highlighting in CLion
|
|
|
|
# target_include_directories(clickhouse_dictionaries SYSTEM PRIVATE ${Poco_Redis_INCLUDE_DIR})
|
|
|
|
|
|
|
|
# for build
|
|
|
|
target_link_libraries(clickhouse_dictionaries PRIVATE ${Poco_Redis_LIBRARY})
|
2019-01-15 22:08:56 +00:00
|
|
|
endif()
|
|
|
|
|
2018-11-28 11:37:12 +00:00
|
|
|
add_subdirectory(Embedded)
|
2019-09-20 23:22:40 +00:00
|
|
|
|
|
|
|
target_include_directories(clickhouse_dictionaries SYSTEM PRIVATE ${SPARSEHASH_INCLUDE_DIR})
|