mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 19:02:04 +00:00
29 lines
799 B
CMake
29 lines
799 B
CMake
macro(configure_bash_completion)
|
|
set(out "/usr/share/bash-completion/completions")
|
|
find_program(pkg-config PKG_CONFIG_BIN)
|
|
if (PKG_CONFIG_BIN)
|
|
execute_process(
|
|
COMMAND ${PKG_CONFIG_BIN} --variable=completionsdir bash-completion
|
|
OUTPUT_VARIABLE ${out}
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
)
|
|
endif()
|
|
string(REPLACE /usr "${CMAKE_INSTALL_PREFIX}" out "${out}")
|
|
message(STATUS "bash_completion will be written to ${out}")
|
|
endmacro()
|
|
|
|
configure_bash_completion()
|
|
foreach (name
|
|
# set of functions
|
|
clickhouse-bootstrap
|
|
|
|
# binaries that accept settings as command line argument
|
|
clickhouse-client
|
|
clickhouse-local
|
|
clickhouse-benchmark
|
|
|
|
clickhouse
|
|
)
|
|
install(FILES ${name} DESTINATION ${out})
|
|
endforeach()
|