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

How do I pass parameters to the generator, such as ninja #4158

Open
Carter-chao opened this issue Nov 6, 2024 · 5 comments
Open

How do I pass parameters to the generator, such as ninja #4158

Carter-chao opened this issue Nov 6, 2024 · 5 comments
Labels
more info needed More info is needed from the community for us to properly triage and investigate.

Comments

@Carter-chao
Copy link

I tried cmake.buildToolArgs and cmake.buildArgs and it didn't work,

@Carter-chao
Copy link
Author

I hope to receive any helpful assistance.

@Carter-chao
Copy link
Author

any help?

@Yingzi1234
Copy link
Collaborator

@Carter-chao
Could you try adding the following code to the CMakeUserPresets.json file? And then try again if that solves the issue?

{
  "version": 3,
  "cmakeMinimumRequired": {
    "major": 3,
    "minor": 22,
    "patch": 0
  },
  "buildPresets": [
    {
      "name": "ninja",
      "generator": "Ninja",
      "binaryDir": "build",
      "buildToolArgs": ["-j4"]  // Add ninja args here
    }
  ]
}

@Carter-chao
Copy link
Author

Image
It looks like it’s not working.

@gcampbell-msft
Copy link
Collaborator

@Carter-chao @Yingzi1234 We don't support buildToolArgs from CMakePresets.json. However, if you create a build preset, you can likely make use of the nativeToolOptions. See the docs here: https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#build-preset

@Yingzi1234 Yingzi1234 added more info needed More info is needed from the community for us to properly triage and investigate. and removed triage labels Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info needed More info is needed from the community for us to properly triage and investigate.
Projects
Status: Blocked
Development

No branches or pull requests

3 participants