Skip to content

Commit

Permalink
Merge pull request #5482 from rduivenvoorde/create_WITH_CLANG_TIDY-take2
Browse files Browse the repository at this point in the history
adding WITH_CLANG_TIDY as advanced, so you can build without it even …
  • Loading branch information
nyalldawson authored Oct 31, 2017
2 parents 48d43d3 + d09331e commit 8afbaeb
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -735,18 +735,22 @@ ENDIF (WITH_CORE)

####################################################
# clang-tidy
SET (WITH_CLANG_TIDY FALSE CACHE BOOL "Use Clang tidy")
MARK_AS_ADVANCED(WITH_CORE)
IF (WITH_CORE)
FIND_PROGRAM(
CLANG_TIDY_EXE
NAMES "clang-tidy"
DOC "Path to clang-tidy executable"
)
IF(NOT CLANG_TIDY_EXE)
MESSAGE(STATUS "clang-tidy not found.")
ELSE(NOT CLANG_TIDY_EXE)
MESSAGE(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
SET(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-checks=*,-clang-analyzer-alpha.*,-cppcoreguidelines*,-readability-implicit-bool-cast,-llvm-include-order,-cert-err58-cpp,-modernize-pass-by-value,-google-readability-braces-around-statements,-modernize-use-auto,-modernize-loop-convert,-readability-else-after-return,-readability-braces-around-statements,-google-runtime-references,-readability-named-parameter,-google-default-arguments,-google-readability-todo,-readability-inconsistent-declaration-parameter-name,-cert-flp30-c,-google-readability-casting,-clang-analyzer-security.FloatLoopCounter,-google-runtime-int,-modernize-use-using,-google-explicit-constructor,-google-build-using-namespace,-cert-err34-c,-clang-analyzer-core.CallAndMessage,-google-readability-function-size,-modernize-make-shared,-modernize-use-nullptr,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-core.NonNullParamChecker,performance-unnecessary-copy-initialization,-readability-simplify-boolean-expr,-modernize-raw-string-literal,-performance-unnecessary-copy-initialization")
ENDIF(NOT CLANG_TIDY_EXE)
IF(WITH_CLANG_TIDY)
FIND_PROGRAM(
CLANG_TIDY_EXE
NAMES "clang-tidy"
DOC "Path to clang-tidy executable"
)
IF(NOT CLANG_TIDY_EXE)
MESSAGE(STATUS "clang-tidy not found.")
ELSE(NOT CLANG_TIDY_EXE)
MESSAGE(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
SET(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-checks=*,-clang-analyzer-alpha.*,-cppcoreguidelines*,-readability-implicit-bool-cast,-llvm-include-order,-cert-err58-cpp,-modernize-pass-by-value,-google-readability-braces-around-statements,-modernize-use-auto,-modernize-loop-convert,-readability-else-after-return,-readability-braces-around-statements,-google-runtime-references,-readability-named-parameter,-google-default-arguments,-google-readability-todo,-readability-inconsistent-declaration-parameter-name,-cert-flp30-c,-google-readability-casting,-clang-analyzer-security.FloatLoopCounter,-google-runtime-int,-modernize-use-using,-google-explicit-constructor,-google-build-using-namespace,-cert-err34-c,-clang-analyzer-core.CallAndMessage,-google-readability-function-size,-modernize-make-shared,-modernize-use-nullptr,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-core.NonNullParamChecker,performance-unnecessary-copy-initialization,-readability-simplify-boolean-expr,-modernize-raw-string-literal,-performance-unnecessary-copy-initialization")
ENDIF(NOT CLANG_TIDY_EXE)
ENDIF(WITH_CLANG_TIDY)
ENDIF (WITH_CORE)

#############################################################
Expand Down

0 comments on commit 8afbaeb

Please sign in to comment.