ClickHouse/docs/_includes/cmake_in_clickhouse_header.md
2022-05-25 01:56:24 +02:00

1005 B

CMake in ClickHouse

Minimal ClickHouse build example:

cmake .. \
    -DCMAKE_C_COMPILER=$(which clang-14) \
    -DCMAKE_CXX_COMPILER=$(which clang++-14) \
    -DCMAKE_BUILD_TYPE=Debug \
    -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 /contrib/*/CMakeLists.txt).
  4. 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.
  • 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.