MSVC: Enable clang-tidy analyser

This enables the use of clang-tidy in the VS IDE.

To use it:

1 - Enable WITH_CLANG_TIDY in your cmake configuration
2 - From the Analyse pull down menu select Run Code Analysis on...

The analyser is currently not enabled by default on build
given it is quite slow and there are quite a few problems
it reports that we still need to deal with.
This commit is contained in:
Ray Molenkamp
2020-12-03 11:00:58 -07:00
parent 769818f7f4
commit f637b47064
3 changed files with 19 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ if(WITH_LEGACY_OPENGL)
add_definitions(-DWITH_LEGACY_OPENGL)
endif()
if(WITH_CLANG_TIDY)
if(WITH_CLANG_TIDY AND NOT MSVC)
if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
message(WARNING "Currently Clang-Tidy might fail with GCC toolchain, switch to Clang toolchain if that happens")
endif()