mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-21 13:45:38 +00:00
Now checking that clang-tidy is actually installed before attempting to use it.
This commit is contained in:
parent
1cee40f291
commit
6a7eb982f2
|
@ -28,11 +28,16 @@ option(VLC_PLAYER "Set to ON to build the VLC-based video player" ${VLC_PLAYER})
|
|||
option(CLANG_TIDY "Set to ON to build using the clang-tidy static analyzer" ${CLANG_TIDY})
|
||||
|
||||
if (CLANG_TIDY)
|
||||
message("-- Building with the clang-tidy static analyzer")
|
||||
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=*,-fuchsia-*,-hicpp-*,-llvm-*, \
|
||||
-readability-braces-*,-google-readability-braces-*, \
|
||||
-readability-uppercase-literal-suffix,-modernize-use-trailing-return-type, \
|
||||
-cppcoreguidelines-avoid-magic-numbers,-readability-magic-numbers")
|
||||
find_program(CLANG_TIDY_BINARY NAMES clang-tidy)
|
||||
if("${CLANG_TIDY_BINARY}" STREQUAL "CLANG_TIDY_BINARY-NOTFOUND")
|
||||
message("-- CLANG_TIDY was set but the clang-tidy binary was not found")
|
||||
else()
|
||||
message("-- Building with the clang-tidy static analyzer")
|
||||
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=*,-fuchsia-*,-hicpp-*,-llvm-*, \
|
||||
-readability-braces-*,-google-readability-braces-*, \
|
||||
-readability-uppercase-literal-suffix,-modernize-use-trailing-return-type, \
|
||||
-cppcoreguidelines-avoid-magic-numbers,-readability-magic-numbers")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue