Warning, /education/gcompris/cmake/CodeQualityUtils.cmake is written in an unsupported language. File is not indexed.
0001 #============================================================================= 0002 # SPDX-FileCopyrightText: 2018 Johnny Jazeix <jazeix@gmail.com> 0003 # 0004 # SPDX-License-Identifier: BSD-3-Clause 0005 #============================================================================= 0006 # These tools are run (for now) only if BUILD_TESTING is ON 0007 # Another useful tool could be clazy compiler too 0008 0009 # Run cppcheck on the code 0010 find_program(CPPCHECK_EXE NAMES cppcheck) 0011 if(CPPCHECK_EXE) 0012 set(CMAKE_CXX_CPPCHECK ${CPPCHECK_EXE}) 0013 list( 0014 APPEND CMAKE_CXX_CPPCHECK 0015 "--enable=all" 0016 "--inconclusive" 0017 "--force" 0018 "--inline-suppr" 0019 ) 0020 endif() 0021 0022 # Run clang-tidy 0023 find_program(CLANG_TIDY_EXE NAMES clang-tidy) 0024 if(CLANG_TIDY_EXE) 0025 set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXE}) 0026 list( 0027 APPEND CMAKE_CXX_CLANG_TIDY 0028 "-checks=*,-fuchsia*,-google*,-hicpp*,-llvm*,-cppcoreguidelines-*,-modernize-use-auto,-modernize-use-trailing-return-type,-readability-*,-altera-*,-misc-const-correctness,-bugprone-easily-swappable-parameters,-modernize-return-braced-init-list,-misc-include-cleaner" 0029 ) 0030 endif()