Commit Graph

17 Commits

Author SHA1 Message Date
Azat Khuzhin
498c8b3c52 Fix clang-tidy in utils/examples
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-29 11:36:51 +03:00
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
Amos Bird
4a5e4274f0
base should not depend on Common 2022-04-29 10:26:35 +08:00
Azat Khuzhin
4a2bc64989 Introduce clickhouse_common_zookeeper_no_log (w/o extra deps for examples)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-01-11 23:51:41 +03:00
Alexey Milovidov
fe6b7c77c7 Rename "common" to "base" 2021-10-02 10:13:14 +03:00
Nikita Mikhaylov
c127c433c2 better 2021-05-27 23:43:00 +03:00
Alexey Milovidov
f0580b3f72 Remove unneeded code from CMakeLists 2021-04-24 22:26:00 +03:00
alesapin
15a29dd3e6 Stop yelling 2021-03-03 19:28:46 +03:00
alesapin
f8b81eeeb0 Get rid of own zxid 2021-02-25 11:34:05 +03:00
alesapin
c1e36cfe70 Something working 2021-01-22 19:04:57 +03:00
alesapin
a207e3db75 Fix bad sleep 2020-12-17 19:21:46 +03:00
alesapin
e80b93939f Add one more case in zk test uti 2020-12-17 18:09:22 +03:00
alesapin
ade14da634 Remove some redundant files 2020-11-11 18:45:10 +03:00
alesapin
d83c68fca8 Fix timeouts 2020-11-11 16:55:28 +03:00
alesapin
bb3b420057 Ugly working code 2020-11-11 11:51:54 +03:00
alesapin
09fac0da9d Better 2020-11-09 21:16:02 +03:00
alesapin
ba449d7c92 Add small test 2020-11-09 20:51:22 +03:00