Skip to content

Commit

Permalink
Use as many threads as cores for clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
badaix committed Feb 9, 2025
1 parent 447d867 commit c765dfa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/clang-tidy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ if(CMAKE_VERSION VERSION_EQUAL "3.19.0" OR CMAKE_VERSION VERSION_GREATER
# If run-clang-tidy found
if(CLANG_TIDY)

include(ProcessorCount)
ProcessorCount(CPU_CORES)

add_custom_target(
clang-tidy
COMMAND ${CLANG_TIDY}
COMMAND ${CLANG_TIDY} -j ${CPU_CORES}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Static code analysis using ${CLANG_TIDY}")

Expand Down

0 comments on commit c765dfa

Please sign in to comment.