How can one pass a clang
flag, e.g. -fms-compatibility-version
with the <LANG>_CLANG_TIDY
CMake property? On the CLI this is easy:
clang-tidy main.cpp -- -fms-compatibility-version=19.10
But with CMake this does not work as expected:
-DCMAKE_CXX_CLANG_TIDY="clang-tidy;-checks=-*,readability-*;--;-fms-compatibility-version=19.10"
The flag is required to make clang
work with modern versions of MSVC.
If this is not possible; Is there any other way to integrate CMake+MSVC+clang-tidy (besides creating a custom build target)?