microsoft / microsoft/vscode-cmake-tools
config to not pass '-j' to cmake
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
### Brief Issue Summary
Cmake-tools always adds '-j' to the cmake-invocation. So its not possible to use other methods that cmake supoorts for setting the parallelism value, like a environmentVariables in cmake-tools-kits.json.
### CMake Tools Diagnostics
_No response_
### Debug Log
_No response_
### Additional Information
I have a project set up in a way so that the number of build jobs is supplied by another tool.
But I found no way to make cmake-tools not add any "-j X" flag to the call of cmake.
It seemed that #2187 intended to add this behavior when cmake.parallelJobs is 1, but now currently, 1 forces '-j 1' on the command line.
In theory, cmake.parallelJobs=null has the right behavior, but the json config validator of vscode does not like this, so I have to manually edit the config.json.
I would suggest to allow null in the config (which probably means adding it here: https://github.com/microsoft/vscode-cmake-tools/blob/c66d1eab6248f5fb82e128cc10ecbab95b95285c/src/config.ts#L473),
and to add a clearer explanation of what 1 vs undefined to to the setting description.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/config.ts around the cmake.parallelJobs setting and review how its configuration value is validated and described. Confirm that null is accepted and that the setting text clearly distinguishes 1 from undefined or null; done means VS Code no longer rejects the configuration and users can omit the -j argument.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, typescript, vscode
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100