add modernizer fixits
This commit is contained in:
@@ -53,6 +53,25 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
set(warnings "/W4 /WX /EHsc")
|
||||
endif()
|
||||
|
||||
if(ENABLE_COVERAGE)
|
||||
include(CodeCoverage)
|
||||
append_coverage_compiler_flags()
|
||||
set(COVERAGE_EXCLUDES "osci-lib/scc/*" "/engr/dev/tools/*")
|
||||
endif()
|
||||
|
||||
find_program(CLANG_TIDY_EXE NAMES "clang-tidy-9")
|
||||
if (CLANG_TIDY_EXE)
|
||||
message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
|
||||
set(CLANG_TIDY_CHECKS "-*,modernize-*,-modernize-use-trailing-return-type,clang-analyzer-core.*")
|
||||
set(CMAKE_CXX_CLANG_TIDY
|
||||
${CLANG_TIDY_EXE};
|
||||
-checks=${CLANG_TIDY_CHECKS};
|
||||
-fix;)
|
||||
else()
|
||||
message(AUTHOR_WARNING "clang-tidy not found!")
|
||||
set(CMAKE_CXX_CLANG_TIDY "" CACHE STRING "" FORCE) # delete it
|
||||
endif()
|
||||
|
||||
setup_conan()
|
||||
|
||||
# This line finds the boost lib and headers.
|
||||
|
Reference in New Issue
Block a user