Warning, /rolisteam/rolisteam/cmake/StaticAnalyzers.cmake is written in an unsupported language. File is not indexed.

0001 option(ENABLE_CPPCHECK "Enable static analysis with cppcheck" OFF)
0002 option(ENABLE_CLANG_TIDY "Enable static analysis with clang-tidy" OFF)
0003 option(ENABLE_INCLUDE_WHAT_YOU_USE "Enable static analysis with include-what-you-use" OFF)
0004 
0005 if(ENABLE_CPPCHECK)
0006   find_program(CPPCHECK cppcheck)
0007   if(CPPCHECK)
0008     set(CMAKE_CXX_CPPCHECK
0009         ${CPPCHECK}
0010         --suppress=missingInclude
0011         --enable=all
0012         --inline-suppr
0013         --inconclusive
0014         -i
0015         ${CMAKE_SOURCE_DIR}/imgui/lib)
0016   else()
0017     message(SEND_ERROR "cppcheck requested but executable not found")
0018   endif()
0019 endif()
0020 
0021 if(ENABLE_CLANG_TIDY)
0022   find_program(CLANGTIDY clang-tidy)
0023   if(CLANGTIDY)
0024     set(CMAKE_CXX_CLANG_TIDY ${CLANGTIDY} -extra-arg=-Wno-unknown-warning-option)
0025   else()
0026     message(SEND_ERROR "clang-tidy requested but executable not found")
0027   endif()
0028 endif()
0029 
0030 if(ENABLE_INCLUDE_WHAT_YOU_USE)
0031   find_program(INCLUDE_WHAT_YOU_USE include-what-you-use)
0032   if(INCLUDE_WHAT_YOU_USE)
0033     set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${INCLUDE_WHAT_YOU_USE})
0034   else()
0035     message(SEND_ERROR "include-what-you-use requested but executable not found")
0036   endif()
0037 endif()