mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-01-18 23:41:36 +00:00
disable clang-tidy for normal builds
It may cause errors when cross compiling. Keep it for profiling builds though. Fixes #475.
This commit is contained in:
parent
b9c253b6d9
commit
73689925da
1 changed files with 12 additions and 16 deletions
|
@ -342,6 +342,18 @@ if ( enable-profiling )
|
|||
endif ( )
|
||||
|
||||
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPT_FLAGS}" )
|
||||
|
||||
if ( CMAKE_VERSION VERSION_GREATER "3.6.0" )
|
||||
find_program( CLANG_TIDY
|
||||
NAMES "clang-tidy"
|
||||
DOC "Path to clang-tidy executable" )
|
||||
|
||||
if ( CLANG_TIDY )
|
||||
message ( STATUS "Found clang-tidy" )
|
||||
set ( CMAKE_C_CLANG_TIDY "clang-tidy" )
|
||||
endif ( CLANG_TIDY )
|
||||
endif ( CMAKE_VERSION VERSION_GREATER "3.6.0" )
|
||||
|
||||
endif ( enable-profiling )
|
||||
|
||||
unset ( ENABLE_TRAPONFPE CACHE )
|
||||
|
@ -375,22 +387,6 @@ if ( CMAKE_BUILD_TYPE MATCHES "Debug" )
|
|||
set ( DEBUG 1 )
|
||||
endif ( CMAKE_BUILD_TYPE MATCHES "Debug" )
|
||||
|
||||
if ( CMAKE_VERSION VERSION_GREATER "3.6.0" )
|
||||
find_program( CLANG_TIDY
|
||||
NAMES "clang-tidy"
|
||||
DOC "Path to clang-tidy executable" )
|
||||
|
||||
if ( 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" )
|
||||
else ( WITH_PROFILING )
|
||||
set ( CMAKE_C_CLANG_TIDY "clang-tidy;-checks=-*,readability-braces-*;-format-style=file" )
|
||||
endif ( WITH_PROFILING )
|
||||
endif ( CLANG_TIDY )
|
||||
endif ( CMAKE_VERSION VERSION_GREATER "3.6.0" )
|
||||
|
||||
# Additional targets to perform clang-format/clang-tidy
|
||||
# Get all project files
|
||||
file(GLOB_RECURSE
|
||||
|
|
Loading…
Reference in a new issue