Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for the Ninja Multi-Config generator #1423

Closed
MathiasMagnus opened this issue Aug 31, 2020 · 5 comments · Fixed by #2314
Closed

Support for the Ninja Multi-Config generator #1423

MathiasMagnus opened this issue Aug 31, 2020 · 5 comments · Fixed by #2314
Assignees
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure
Milestone

Comments

@MathiasMagnus
Copy link
Contributor

Brief Issue Summary

CMake Tools bails out when trying to use the Ninja Multi-Config generator.

Expected:

  1. Set "preferredGenerator": { "name": "Ninja Multi-Config" } for a Kit
  2. Develop much like on would with a multi-configuration generator, such as MSBuild

Apparent Behavior:

Receive an error when setting the kit: Unable to set kit "{0}".

CMake Tools Log

[main] Configuring folder: Test-Boost.UT 
[main] Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update settings.json, your Kit configuration or PATH variable. Error: No usable generator found.
[main] Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update settings.json, your Kit configuration or PATH variable. Error: No usable generator found.

Platform and Versions

  • Operating System: Windows
  • CMake Version: 3.18.1
  • VSCode Version: 1.48.2
  • CMake Tools Extension Version: 1.4.1
  • Compiler/Toolchain: Visual C++ 2019
@bobbrow bobbrow added enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure labels Aug 31, 2020
@bobbrow bobbrow added this to the 1.5.0 milestone Aug 31, 2020
@Wastus
Copy link

Wastus commented Feb 9, 2021

Ran into this issue as well, you can workaround this by setting: "cmake.generator": "Ninja Multi-Config", in the settings.json. Though this will not help if you want to switch between kits with different generators.
It's a bit strange that this works without complaints, but setting it in preferredGenerator does not.

As the cmake.generator settings overrides the preferredGenerator setting, you do not have to remove the content from the kit definition until the issue is resolved.

Platform and Versions

  • Operating System: WIndows
  • CMake Version: 3.19.4
  • VSCode Version: 1.53.0
  • CMake Tools Extension Version: 1.5.3
  • Compiler/Toolchain: ARM GCC 10.2.1

@bobbrow bobbrow modified the milestones: 1.6.0, 1.7.0 Feb 16, 2021
@bobbrow bobbrow modified the milestones: 1.7.0, 1.8.0 Apr 23, 2021
@bobbrow bobbrow modified the milestones: 1.8.0, 1.9.0 Aug 17, 2021
@bobbrow bobbrow modified the milestones: 1.9.0, 1.10.0 Oct 4, 2021
@lygstate
Copy link
Contributor

lygstate commented Nov 8, 2021

Any plan on this?

@bobbrow
Copy link
Member

bobbrow commented Nov 8, 2021

We are considering it for 1.10.0

@bobbrow
Copy link
Member

bobbrow commented Mar 1, 2022

The fix for this issue is available in 1.10 "pre-release". You can help us validate it by:

  1. Opening the extensions panel in VS Code
  2. Selecting the CMake Tools extension
  3. Clicking the "Switch to Pre-release Version" button

image

@bobbrow
Copy link
Member

bobbrow commented Apr 6, 2022

This was included in 1.10 which is now generally available.

@bobbrow bobbrow closed this as completed Apr 6, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: configure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants