mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-15 03:53:41 +00:00
53471315ff
Default values in Cmake in ClickHouse, as there could be some caveats (e.g. tester not working)
35 lines
1.2 KiB
Markdown
35 lines
1.2 KiB
Markdown
# CMake in ClickHouse
|
|
|
|
## TL; DR How to make ClickHouse compile and link faster?
|
|
|
|
Developer only! This command will likely fulfill most of your needs. Run before calling `ninja`.
|
|
|
|
```cmake
|
|
cmake .. \
|
|
-DCMAKE_C_COMPILER=/bin/clang-10 \
|
|
-DCMAKE_CXX_COMPILER=/bin/clang++-10 \
|
|
-DCMAKE_BUILD_TYPE=Debug \
|
|
-DENABLE_CLICKHOUSE_ALL=OFF \
|
|
-DENABLE_CLICKHOUSE_SERVER=ON \
|
|
-DENABLE_CLICKHOUSE_CLIENT=ON \
|
|
-DUSE_STATIC_LIBRARIES=OFF \
|
|
-DSPLIT_SHARED_LIBRARIES=ON \
|
|
-DENABLE_LIBRARIES=OFF \
|
|
-DUSE_UNWIND=ON \
|
|
-DENABLE_UTILS=OFF \
|
|
-DENABLE_TESTS=OFF
|
|
```
|
|
|
|
## CMake files types
|
|
|
|
1. ClickHouse's source CMake files (located in the root directory and in `/src`).
|
|
2. Arch-dependent CMake files (located in `/cmake/*os_name*`).
|
|
3. Libraries finders (search for contrib libraries, located in `/cmake/find`).
|
|
3. Contrib build CMake files (used instead of libraries' own CMake files, located in `/cmake/modules`)
|
|
|
|
## List of CMake flags
|
|
|
|
* This list is auto-generated by [this Python script](https://github.com/clickhouse/clickhouse/blob/master/docs/tools/cmake_in_clickhouse_generator.py).
|
|
* The flag name is a link to its position in the code.
|
|
* If an option's default value is itself an option, it's also a link to its position in this list.
|