microsoft / vscode-cmake-tools

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

CMake Build presets settings #4067

Closed H-G-Hristov closed 2 months ago

H-G-Hristov commented 2 months ago

Type: Bug

If I have configured CMake build presets, e.g.

  "buildPresets": [
    {
      "name": "default",
      "configurePreset": "default.debug.libcxx"
    },
    {
      "name": "default.debug.libcxx.clang-18",
      "displayName": "Debug libc++ (Clang 18)",
      "configurePreset": "default.debug.libcxx.clang-18",
      "targets": "install-cxx install-cxxabi install-unwind"
    }
  ]

Should I actually see this:

Build
   Debug libc++ (Clang 18)
   [Targets In Preset]

Should I see [Targets In Preset]? Should I just see the selected build preset name?

Is the above a sub-issue of this: https://github.com/microsoft/vscode-cmake-tools/issues/3587

image

Extension version: 1.19.51 VS Code version: Code 1.93.1 (38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, 2024-09-11T17:20:05.685Z) OS version: Windows_NT x64 10.0.19045 Modes: Remote OS version: Linux x64 5.15.153.1-microsoft-standard-WSL2

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2808)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|undefined| |Memory (System)|7.65GB (0.96GB free)| |Process Argv|--crash-reporter-id c7a16f6b-33fc-42c2-aedd-68d1d1ff8687| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|WSL: Ubuntu-24.04| |OS|Linux x64 5.15.153.1-microsoft-standard-WSL2| |CPUs|Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 0)| |Memory (System)|3.72GB (2.16GB free)| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 bdiig495:31013172 a69g1124:31058053 dvdeprecation:31068756 dwnewjupyter:31046869 newcmakeconfigv2:31071590 impr_priority:31102340 nativerepl2:31134655 refactort:31108082 pythonrstrctxt:31112756 flighttreat:31134774 wkspc-onlycs-t:31132770 wkspc-ranged-c:31125598 ei213698:31121563 iacca2:31138163 ```
Amy-Li03 commented 2 months ago

@gcampbell-msft I can reproduce this on CMake Tools version v1.19.51, after configured CMake build preset, [Targets In Preset] also displayed below Project status -> Build in CMAKE panel. Please help confirm whether this is a real issue?

Repro steps:

  1. Extract the attached sample app: Test.zip
  2. Open it with VS code.
  3. Open CMake panel and check the setting below Project status -> Build.

Actual result: [Targets In Preset] displayed below Project status -> Build in CMAKE panel. image

gcampbell-msft commented 2 months ago

@H-G-Hristov @Amy-Li03 This is expected, that option in the project status pane is referring to the build Target, which is a separate idea from the Build Preset. You can select this to determine what target you may be building with the selected build preset. Thanks! I'll close this as by design.

It is related to #3587, by the way, that is a separate issue in the dropdown you are referring to.