vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

CMake's parallel option not respected when using a build preset

Open vadi2 opened this issue 2 years ago • 5 comments

Brief Issue Summary

I'm getting into the world of build presets, and found that my VSCode configuration - such as the number of parallel builds - is not respected when using a specific build preset.

I'd like it very much to still be respected and take precedence over any presets. I'm aware user presets are an option in cmake, but unless you're going to be stashing and popping them all the time, it is just not practical to store user configuration in the repo code.

As a workaround, using the 'default' build preset is respecting the option so that is nice!

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

vadi2 avatar May 14 '23 12:05 vadi2

Does it work for you to .gitignore your CMakeUserPresets.json? My understanding is that that's how the file is designed to be used, so that you can have custom user-specific overrides of checked-in presets.

benmcmorran avatar May 16 '23 16:05 benmcmorran

You are right, though I think git clean will still wipe them, and that's something I use on occasion to ensure a clean state of the repo.

vadi2 avatar May 16 '23 16:05 vadi2

run into the same issue, hope for a quick fix

Zvicii avatar Sep 16 '23 05:09 Zvicii

Yes, I would like a new setting to override the buildPresets.jobs setting in CMakePresets.json to respect the "cmake.parallelJobs" setting in the extension.

jastich avatar Oct 12 '23 17:10 jastich

I just ran into this same issue and I would like to mention that the documentation is also lacking the information that cmake.parallelJobs is ignored, when CMakePresets.json is used. I guess this is true for some other options as well.

i-C-o-d-e-r avatar Aug 28 '25 09:08 i-C-o-d-e-r