microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.46k stars 449 forks source link

Presets not found after generating CMakeUserPresets.json #3313

Closed tim-hilt closed 11 months ago

tim-hilt commented 1 year ago

Brief Issue Summary

When I open a project right after cloning, the CMakeUserPresets.json is not generated yet. After generating, I need to run Developer: Reload Window in order for the cmake-tools extension to suggest the presets.

CMake Tools Diagnostics

{
  "os": "win32",
  "vscodeVersion": "1.81.1",
  "cmtVersion": "1.15.31",
  "configurations": [
    {
      "folder": "confidential",
      "cmakeVersion": "3.25.2",
      "configured": true,
      "generator": "Ninja",
      "usesPresets": true,
      "compilers": {}
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": false,
    "activeBuildType": "",
    "buildTypesSeen": [],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 0,
    "executablesCount": 0,
    "librariesCount": 0,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    }
  ]
}

Debug Log

No response

Additional Information

We're using the conan package-manager to generate the CMake-Cache and CMakeUserPresets.json

gcampbell-msft commented 1 year ago

@tim-hilt What are you expecting the behavior to be?

Could you try to delete cache and regenerate after the CMakeUserPresets is generated? Or even just resetting the CMake extension with the "Reset CMake Tools Extension State" command?

github-actions[bot] commented 11 months ago

This issue is now marked as 'stale' due to there being no activity on it for the past 30 days and being labelled 'more info needed'. Unless the 'stale' label is removed or the issue is commented on, this will be closed in 7 days. If you would like to make this issue exempt from getting stale, please remove the 'more info needed' and 'stale' labels or add the 'stale-exempt' label

github-actions[bot] commented 11 months ago

This issue is now closed due to there being no activity on it for the past 7 days since being marked as 'stale'.