Skip to content

List of targets empty when using ~/... instead of /home/<user>/... as build dir #3541

Description

Brief Issue Summary

I just used the CMake: Quick Start to generate the sample project. I had set the Cmake: Build Directory setting to ~/build/${workspaceRootFolderName}/${buildType}, then generated with Ninja. The CMAKE_BUILD_TYPE was set to Debug.

When trying to configure the Build target in the Project status, the selection dropdown is empty.

image

When trying to configure the Debug or Launch target, the dropdown doesn't even appear at all.


Everything works fine when I set the Cmake: Build Directory setting to /home/andreas/build/${workspaceRootFolderName}/${buildType}.

CMake Tools Diagnostics

{
  "os": "linux",
  "vscodeVersion": "1.85.1",
  "cmtVersion": "1.16.32",
  "configurations": [
    {
      "folder": "/home/andreas/src/cmake-quick",
      "cmakeVersion": "3.28.1",
      "configured": true,
      "generator": "Ninja",
      "usesPresets": false,
      "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

No response

Activity

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

Metadata

Metadata

Labels

buga bug in the productrepro neededThis needs to be reproduced and repro steps detailed either in a comment or in the discussion.

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions