2021-04-24 19:47:52 +00:00
|
|
|
include("${ClickHouse_SOURCE_DIR}/cmake/dbms_glob_sources.cmake")
|
2021-10-31 08:51:20 +00:00
|
|
|
|
2017-11-21 19:17:24 +00:00
|
|
|
add_headers_and_sources(clickhouse_parsers .)
|
2021-10-31 08:51:20 +00:00
|
|
|
add_headers_and_sources(clickhouse_parsers ./Access)
|
2020-04-28 18:36:43 +00:00
|
|
|
add_headers_and_sources(clickhouse_parsers ./MySQL)
|
2022-06-08 17:14:03 +00:00
|
|
|
add_headers_and_sources(clickhouse_parsers ./Kusto)
|
2023-07-20 10:54:42 +00:00
|
|
|
add_headers_and_sources(clickhouse_parsers ./PRQL)
|
2019-04-24 09:06:28 +00:00
|
|
|
add_library(clickhouse_parsers ${clickhouse_parsers_headers} ${clickhouse_parsers_sources})
|
2022-05-10 11:14:00 +00:00
|
|
|
target_link_libraries(clickhouse_parsers PUBLIC clickhouse_common_io clickhouse_common_access string_utils)
|
2023-07-20 10:54:42 +00:00
|
|
|
if (TARGET ch_rust::prql)
|
|
|
|
target_link_libraries(clickhouse_parsers PRIVATE ch_rust::prql)
|
|
|
|
endif ()
|
2017-11-21 19:17:24 +00:00
|
|
|
|
2020-02-24 00:44:38 +00:00
|
|
|
if (USE_DEBUG_HELPERS)
|
2022-01-17 04:33:47 +00:00
|
|
|
# CMake generator expression will do insane quoting when it encounters special character like quotes, spaces, etc.
|
|
|
|
# Prefixing "SHELL:" will force it to use the original text.
|
|
|
|
set (INCLUDE_DEBUG_HELPERS "SHELL:-I\"${ClickHouse_SOURCE_DIR}/base\" -include \"${ClickHouse_SOURCE_DIR}/src/Parsers/iostream_debug_helpers.h\"")
|
|
|
|
# Use generator expression as we don't want to pollute CMAKE_CXX_FLAGS, which will interfere with CMake check system.
|
|
|
|
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:${INCLUDE_DEBUG_HELPERS}>)
|
2020-02-24 00:44:38 +00:00
|
|
|
endif ()
|
|
|
|
|
2021-04-26 22:51:42 +00:00
|
|
|
if(ENABLE_EXAMPLES)
|
|
|
|
add_subdirectory(examples)
|
2018-11-21 19:20:27 +00:00
|
|
|
endif()
|
2021-08-21 02:27:27 +00:00
|
|
|
|
|
|
|
if (ENABLE_FUZZING)
|
|
|
|
add_subdirectory(fuzzers)
|
|
|
|
endif()
|
2023-04-03 13:57:16 +00:00
|
|
|
|
|
|
|
if (ENABLE_TESTS)
|
|
|
|
add_subdirectory(HiliteComparator)
|
|
|
|
endif ()
|