mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 18:02:24 +00:00
1a7727a254
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/ |
||
---|---|---|
.. | ||
examples | ||
fuzzers | ||
MySQL | ||
PostgreSQL | ||
tests | ||
AccurateComparison.h | ||
BackgroundSchedulePool.cpp | ||
BackgroundSchedulePool.h | ||
BaseSettings.cpp | ||
BaseSettings.h | ||
Block.cpp | ||
Block.h | ||
BlockInfo.cpp | ||
BlockInfo.h | ||
callOnTypeIndex.h | ||
CMakeLists.txt | ||
ColumnNumbers.h | ||
ColumnsWithTypeAndName.h | ||
ColumnWithTypeAndName.cpp | ||
ColumnWithTypeAndName.h | ||
config_core.h.in | ||
DecimalComparison.h | ||
DecimalFunctions.h | ||
Defines.h | ||
ExternalResultDescription.cpp | ||
ExternalResultDescription.h | ||
ExternalTable.cpp | ||
ExternalTable.h | ||
Field.cpp | ||
Field.h | ||
InterpolateDescription.cpp | ||
InterpolateDescription.h | ||
iostream_debug_helpers.cpp | ||
iostream_debug_helpers.h | ||
MultiEnum.h | ||
Names.h | ||
NamesAndAliases.h | ||
NamesAndTypes.cpp | ||
NamesAndTypes.h | ||
PostgreSQLProtocol.cpp | ||
PostgreSQLProtocol.h | ||
Protocol.h | ||
ProtocolDefines.h | ||
QualifiedTableName.h | ||
QueryProcessingStage.cpp | ||
QueryProcessingStage.h | ||
ServerUUID.cpp | ||
ServerUUID.h | ||
Settings.cpp | ||
Settings.h | ||
SettingsEnums.cpp | ||
SettingsEnums.h | ||
SettingsFields.cpp | ||
SettingsFields.h | ||
SettingsQuirks.cpp | ||
SettingsQuirks.h | ||
SortCursor.h | ||
SortDescription.cpp | ||
SortDescription.h | ||
TypeId.h | ||
Types.h | ||
UUID.cpp | ||
UUID.h |