2021-04-18 21:51:47 +02:00
|
|
|
if (NOT NPROC)
|
|
|
|
include(ProcessorCount)
|
|
|
|
ProcessorCount(NPROC)
|
|
|
|
if(NPROC EQUAL 0)
|
|
|
|
message(FATAL_ERROR "could not get processor count")
|
2020-04-02 13:55:49 +02:00
|
|
|
endif()
|
2021-04-18 21:51:47 +02:00
|
|
|
endif()
|
|
|
|
message(STATUS "NPROC=${NPROC}")
|
2020-04-02 13:55:49 +02:00
|
|
|
|
2021-10-24 11:07:45 +02:00
|
|
|
find_program(RUN_CLANG_TIDY NAMES run-clang-tidy run-clang-tidy-13 run-clang-tidy-12 run-clang-tidy-11 run-clang-tidy-10 run-clang-tidy-9 run-clang-tidy-8)
|
2021-04-18 21:51:47 +02:00
|
|
|
message(STATUS "RUN_CLANG_TIDY=${RUN_CLANG_TIDY}")
|
|
|
|
if (RUN_CLANG_TIDY)
|
|
|
|
# disable all compiler warnings since we are just interested in the tidy ones
|
|
|
|
add_custom_target(run-clang-tidy ${RUN_CLANG_TIDY} -p=${CMAKE_BINARY_DIR} -j ${NPROC} -extra-arg=-w -quiet)
|
2020-04-02 13:55:49 +02:00
|
|
|
endif()
|