2020-01-23 08:18:19 +00:00
|
|
|
option (ENABLE_REPLXX "Enable replxx support" ${ENABLE_LIBRARIES})
|
|
|
|
|
2020-08-14 15:44:04 +00:00
|
|
|
if (NOT ENABLE_REPLXX)
|
2021-12-11 08:20:36 +00:00
|
|
|
message (STATUS "Not using replxx")
|
2020-08-14 15:44:04 +00:00
|
|
|
return()
|
|
|
|
endif()
|
2020-08-09 18:31:00 +00:00
|
|
|
|
2022-01-18 06:48:24 +00:00
|
|
|
set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/replxx")
|
2020-01-23 08:18:19 +00:00
|
|
|
|
2022-01-18 06:48:24 +00:00
|
|
|
set(SRCS
|
|
|
|
"${LIBRARY_DIR}/src/conversion.cxx"
|
|
|
|
"${LIBRARY_DIR}/src/ConvertUTF.cpp"
|
|
|
|
"${LIBRARY_DIR}/src/escape.cxx"
|
|
|
|
"${LIBRARY_DIR}/src/history.cxx"
|
|
|
|
"${LIBRARY_DIR}/src/terminal.cxx"
|
|
|
|
"${LIBRARY_DIR}/src/prompt.cxx"
|
|
|
|
"${LIBRARY_DIR}/src/replxx_impl.cxx"
|
|
|
|
"${LIBRARY_DIR}/src/replxx.cxx"
|
|
|
|
"${LIBRARY_DIR}/src/util.cxx"
|
|
|
|
"${LIBRARY_DIR}/src/wcwidth.cpp"
|
|
|
|
)
|
2020-01-23 08:18:19 +00:00
|
|
|
|
2022-01-20 14:30:03 +00:00
|
|
|
add_library (_replxx ${SRCS})
|
|
|
|
target_include_directories(_replxx SYSTEM PUBLIC "${LIBRARY_DIR}/include")
|
2020-08-14 15:44:04 +00:00
|
|
|
|
|
|
|
if (COMPILER_CLANG)
|
2022-01-20 14:30:03 +00:00
|
|
|
target_compile_options(_replxx PRIVATE -Wno-documentation)
|
2020-01-23 08:18:19 +00:00
|
|
|
endif ()
|
2020-08-14 15:44:04 +00:00
|
|
|
|
2022-01-20 14:30:03 +00:00
|
|
|
add_library(ch_contrib::replxx ALIAS _replxx)
|