File: PreLoad.cmake

package info (click to toggle)
clickhouse 18.16.1%2Bds-7.3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 40,292 kB
  • sloc: cpp: 223,075; sql: 21,608; python: 6,596; sh: 4,299; ansic: 3,889; xml: 3,312; perl: 155; makefile: 57; asm: 34
file content (21 lines) | stat: -rw-r--r-- 794 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Use Ninja instead of Unix Makefiles by default.
# https://stackoverflow.com/questions/11269833/cmake-selecting-a-generator-within-cmakelists-txt
#
# Reason: it have better startup time than make and it parallelize jobs more uniformly.
# (when comparing to make with Makefiles that was generated by CMake)
#
# How to install Ninja on Ubuntu:
#  sudo apt-get install ninja-build

# CLion does not support Ninja
# You can add your vote on CLion task tracker:
# https://youtrack.jetbrains.com/issue/CPP-2659
# https://youtrack.jetbrains.com/issue/CPP-870

string(TOLOWER "${CMAKE_COMMAND}" CMAKE_COMMAND_LOWER)
if (NOT ${CMAKE_COMMAND_LOWER} MATCHES "clion")
    find_program(NINJA_PATH ninja)
    if (NINJA_PATH)
        set(CMAKE_GENERATOR "Ninja" CACHE INTERNAL "" FORCE)
    endif ()
endif()