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

Don't check generator on PATH if manually specified #4026

Closed
wants to merge 3 commits into from

Conversation

jophippe
Copy link
Contributor

This change addresses item #4005

This changes how the CMake generator gets selected

The following changes are proposed:

  • Add a flag to the get best generator logic to tell whether we're selecting a default generator or a manually specified generator.
  • If we're selecting a default generator, keep the old behavior and check whether the generator exists on PATH
  • If we're selecting a manually specified generator (whether through the cmake.generator setting, the cmake.preferredGenerators setting, or from the kit), we can assume the generator exists and shouldn't check the PATH.

@jophippe jophippe self-assigned this Aug 29, 2024
// in that case, assume it exists and don't check the PATH, only check if it's a supported generator.
// If we are using the default generators, then we should also check if it is on the PATH
if (!usingFallbackGenerators) {
return gen_name === 'Ninja' ||
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going back to, if the user has cmake.generator set, we use it without conditions, I don't think we should have these conditions here, we should simply return true.

@jophippe jophippe closed this Aug 30, 2024
@jophippe jophippe deleted the dev/jophippe/genpath branch August 30, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants