fix build for clang-tidy >= 5.0

This commit is contained in:
derselbst 2018-03-22 21:51:46 +01:00
parent 2099dae4f6
commit 4fd56639fa
2 changed files with 3 additions and 2 deletions

View file

@ -3,6 +3,7 @@ Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,cert-*,clang-analyzer-*
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: file
User: tom
CheckOptions:
- key: cert-dcl59-cpp.HeaderFileExtensions

View file

@ -322,9 +322,9 @@ find_program( CLANG_TIDY
message ( STATUS "Found clang-tidy" )
# whenever clang-tidy is available, use it to automatically add braces after ever "make"
if ( WITH_PROFILING )
set ( CMAKE_C_CLANG_TIDY "clang-tidy;-style=file" )
set ( CMAKE_C_CLANG_TIDY "clang-tidy" )
else ( WITH_PROFILING )
set ( CMAKE_C_CLANG_TIDY "clang-tidy;-checks=-*,readability-braces-around-statements" )
set ( CMAKE_C_CLANG_TIDY "clang-tidy;-checks=-*,readability-braces-around-statements;-format-style=file" )
endif ( WITH_PROFILING )
endif ( CLANG_TIDY )
endif ( CMAKE_VERSION VERSION_GREATER "3.6.0" )