Warning, /acts/cmake/ActsStaticAnalysis.cmake is written in an unsupported language. File is not indexed.
0001 if(ACTS_RUN_CLANG_TIDY)
0002 find_program(CLANG_TIDY_COMMAND NAMES clang-tidy)
0003
0004 if(NOT CLANG_TIDY_COMMAND)
0005 message(
0006 WARNING
0007 "ACTS_RUN_CLANG_TIDY is ON but clang-tidy is not found!"
0008 )
0009 set(ACTS_CXX_CLANG_TIDY "" CACHE STRING "" FORCE)
0010 else()
0011 message(STATUS "Setting up clang-tidy run")
0012
0013 set(CLANG_TIDY_HEADER_FILTER ".*")
0014
0015 set(ACTS_CXX_CLANG_TIDY
0016 "${CLANG_TIDY_COMMAND};-header-filter=${CLANG_TIDY_HEADER_FILTER};-config-file=${CMAKE_SOURCE_DIR}/.clang-tidy"
0017 )
0018 endif()
0019 endif()
0020
0021 function(acts_enable_static_analysis)
0022 set(CMAKE_CXX_CLANG_TIDY "${ACTS_CXX_CLANG_TIDY}" CACHE STRING "" FORCE)
0023 endfunction()
0024
0025 function(acts_disable_static_analysis)
0026 set(CMAKE_CXX_CLANG_TIDY "" CACHE STRING "" FORCE)
0027 endfunction()