disable clang tidy by default during build

master
Andre Puschmann 6 years ago
parent 463b00d82d
commit 22503541b1

@ -77,6 +77,7 @@ option(BUILD_STATIC "Attempt to statically link external deps" OFF)
option(RPATH "Enable RPATH" OFF) option(RPATH "Enable RPATH" OFF)
option(ENABLE_ASAN "Enable gcc/clang address sanitizer" OFF) option(ENABLE_ASAN "Enable gcc/clang address sanitizer" OFF)
option(ENABLE_MSAN "Enable clang memory sanitizer" OFF) option(ENABLE_MSAN "Enable clang memory sanitizer" OFF)
option(ENABLE_TIDY "Enable clang tidy" OFF)
option(USE_LTE_RATES "Use standard LTE sampling rates" OFF) option(USE_LTE_RATES "Use standard LTE sampling rates" OFF)
@ -362,18 +363,19 @@ message(STATUS "CMAKE_CXX_FLAGS is ${CMAKE_CXX_FLAGS}")
######################################################################## ########################################################################
# clang-tidy check # clang-tidy check
######################################################################## ########################################################################
find_program( if(ENABLE_TIDY)
CLANG_TIDY_BIN find_program(
NAMES "clang-tidy" CLANG_TIDY_BIN
DOC "Path to clang-tidy executable" NAMES "clang-tidy"
) DOC "Path to clang-tidy executable"
if(NOT CLANG_TIDY_BIN) )
message(STATUS "clang-tidy not found.") if(NOT CLANG_TIDY_BIN)
else() message(STATUS "clang-tidy not found.")
message(STATUS "clang-tidy found: ${CLANG_TIDY_BIN}") else()
set(DO_CLANG_TIDY "${CLANG_TIDY_BIN}" "-checks=*,-clang-analyzer-alpha.*,-modernize-*,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-bounds-constant-array-index") message(STATUS "clang-tidy found: ${CLANG_TIDY_BIN}")
endif() set(DO_CLANG_TIDY "${CLANG_TIDY_BIN}" "-checks=*,-clang-analyzer-alpha.*,-modernize-*,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-bounds-constant-array-index")
endif()
endif(ENABLE_TIDY)
######################################################################## ########################################################################
# Create uninstall targets # Create uninstall targets

Loading…
Cancel
Save