You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve clang-tidy support for MSVC and update docs
Added a workaround in cpp-library.cmake to automatically append --extra-arg=/EHsc to CMAKE_CXX_CLANG_TIDY when using MSVC, addressing a known clang-tidy issue with exception handling flags. Updated README with documentation about this issue and the applied solution. Also simplified test executable handling logic in _cpp_library_setup_executables.
**Solution**: Repository name must match package name. For package `stlab-enum-ops`, use repository `stlab/stlab-enum-ops`, not `stlab/enum-ops`.
540
540
541
+
### Clang-Tidy on Windows/MSVC
542
+
543
+
**Problem**: Clang-tidy reports "exceptions are disabled" when analyzing code on Windows with MSVC
544
+
545
+
**Solution**: This is a known clang-tidy issue ([CMake #22979](https://gitlab.kitware.com/cmake/cmake/-/issues/22979)) where clang-tidy doesn't properly recognize MSVC's `/EHsc` exception handling flag. cpp-library automatically detects this scenario and adds `--extra-arg=/EHsc` to `CMAKE_CXX_CLANG_TIDY` when both MSVC and clang-tidy are enabled. This workaround is applied transparently and only on MSVC platforms.
0 commit comments