Commit Graph

14 Commits

Author SHA1 Message Date
Antonio Andelic
67567fcff4 Fix build 2024-07-24 19:51:22 +02: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
Alexey Milovidov
f0580b3f72 Remove unneeded code from CMakeLists 2021-04-24 22:26:00 +03:00
Alexey Milovidov
a576a4fbcd Enable extra warnings for base, utils, programs 2020-05-10 01:59:34 +03:00
proller
1d40c2c871 Better link and deps (#3631)
* try fix 1

* Better deps

* fix

* fix

* fix

* Update CMakeLists.txt

* Update CMakeLists.txt

* fix

* fix

* fix

* disable old

* Update find_odbc.cmake
2018-11-21 22:20:27 +03:00
proller
6ff1968196 Compile and likk optimize and fixes 2017-11-24 21:08:01 +03:00
proller
d6833a0d55 Cmake: remove global include_directories (#1055)
* Fix .h compile

* Cmake: remove global include_directories

* boost include hide

* fix cctz

* add \n
2017-08-03 15:44:39 +03:00
proller
72ccc69212 Debian: simpler package (#662)
* Allow use external re2 with re2_st=re2

* fix

* remove dupe

* use re2_st in FunctionsStringSearch.h

* fix

* move files from tools/etc to debian

* dont generate control

* version

* ok.

* wip

* Cmake: dont touch CMAKE_INSTALL_PREFIX

* wip

* works!

* clean

* okay

* like old

* wip

* wip

* okay

* clickhouse-server-base-dbg

* clean

* clickhouse-server-dbg

* Debian: Remove daemons

* Update rules

* add source/format

* control clean

* add watch

* clean

* clean

* temp fix build

* clean

* docs

* fake make_control

* fix

* testme

* testme

* add metrika package

* fake metrika files
2017-04-10 20:43:30 +03:00
Alexey Milovidov
310736cd7e Moved headers and sources to same place [#CLICKHOUSE-3]. 2017-04-01 12:22:42 +03:00
Alexey Milovidov
137ad95929 Changed tabs to spaces in code [#CLICKHOUSE-3]. 2017-04-01 11:35:09 +03:00
Pavel Kartavyy
224ba16dcb use project source and binary dirs instead of global dirs 2017-02-06 18:15:19 +03:00
proller
29475c94c0 Reorganize includes, less depends in .h files 2017-01-16 22:47:11 +03:00
Alexey Milovidov
df1d66e51a Removed sensitive data. 2016-02-08 00:58:58 +03:00
Pavel Kartavyy
809b3ebc0b benchmark: added util to correct non-utf symbols [#CONV-8419] 2013-09-06 08:41:19 +00:00