Skip to content

Code Analysis via Presets #1781

Description

I recently learned about these interesting "CMakeSettings.json" options in Visual Studio 2019:

      "enableMicrosoftCodeAnalysis": true,
      "enableClangTidyCodeAnalysis": true,
      "clangTidyChecks" : ""

I wondered if anything like that could be implemented with the new CMake presets support. It looks like CMake has the solution via the vendor map object.
I am not aware if VS2019 will implement any such extensions via CMake presets but it would great to have unified support of the above options.
I think this should be considered as an extension to this FR: Enabling code analysis? #1136

https://devblogs.microsoft.com/cppblog/cmake-presets-integration-in-visual-studio-and-visual-studio-code/
https://learn.microsoft.com/en-us/cpp/build/cmake-presets-json-reference?view=msvc-170
https://learn.microsoft.com/en-us/cpp/code-quality/how-to-set-code-analysis-properties-for-c-cpp-projects?view=msvc-170
https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/cmake-presets.md
https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#condition

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: presetsenhancementan enhancement to the product that is either not present or an improvement to an existing feature

    Type

    No type

    Projects

    • Status
      Pending Prioritization

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions