ClickHouse/programs/library-bridge
Robert Schulze 1a7727a254
Prefix overridden add_executable() command with "clickhouse_"
A simple HelloWorld program with zero includes except iostream triggers
a build of ca. 2000 source files. The reason is that ClickHouse's
top-level CMakeLists.txt overrides "add_executable()" to link all
binaries against "clickhouse_new_delete". This links against
"clickhouse_common_io", which in turn has lots of 3rd party library
dependencies ... Without linking "clickhouse_new_delete", the number of
compiled files for "HelloWorld" goes down to ca. 70.

As an example, the self-extracting-executable needs none of its current
dependencies but other programs may also benefit.

In order to restore access to the original "add_executable()", the
overriding version is now prefixed. There is precedence for a
"clickhouse_" prefix (as opposed to "ch_"), for example
"clickhouse_split_debug_symbols". In general prefixing makes sense also
because overriding CMake commands relies on undocumented behavior and is
considered not-so-great practice (*).

(*) https://crascit.com/2018/09/14/do-not-redefine-cmake-commands/
2022-07-11 19:36:18 +02:00
..
CMakeLists.txt Prefix overridden add_executable() command with "clickhouse_" 2022-07-11 19:36:18 +02:00
HandlerFactory.cpp
HandlerFactory.h base should not depend on Common 2022-04-29 10:26:35 +08:00
Handlers.cpp Fix formatting error in logging messages 2022-02-01 14:30:04 +03:00
Handlers.h base should not depend on Common 2022-04-29 10:26:35 +08:00
library-bridge.cpp
LibraryBridge.cpp
LibraryBridge.h base should not depend on Common 2022-04-29 10:26:35 +08:00
LibraryInterface.cpp base should not depend on Common 2022-04-29 10:26:35 +08:00
LibraryInterface.h
LibraryUtils.h Rename "common" to "base" 2021-10-02 10:13:14 +03:00
SharedLibraryHandler.cpp Remove streams from formats. 2021-10-11 19:11:50 +03:00
SharedLibraryHandler.h base should not depend on Common 2022-04-29 10:26:35 +08:00
SharedLibraryHandlerFactory.cpp Activate clang-tidy warning "readability-container-contains" 2022-04-18 23:53:11 +02:00
SharedLibraryHandlerFactory.h Support for Clang Thread Safety Analysis (TSA) 2022-06-20 16:13:25 +02:00