microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.48k stars 453 forks source link

CMake buildPresets jobs flag and parallel settings inconsistent #4176

Open kennon-mckeever opened 1 week ago

kennon-mckeever commented 1 week ago

Brief Issue Summary

When building using a cmake build preset, if I specify "jobs": 0 in my build preset, I get inconsistent parallelism between the command line and CMakeTools build command/button. The command line cmake --build --preset=debug will compile in parallel while the CMakeTools build command will compile sequentially. This happens regardless of the cmake.parallelJobs setting (I've tried 0 and 8).

CMake Tools Diagnostics

Debug Log

Additional Information

I am using make and g++ on linux.

I also noticed that if the "jobs" line in the cmake build preset is removed, the cmake.parallelJobs setting also has no influence - I would expect this setting to be the default if a build preset doesn't specify anything.

Yingzi1234 commented 6 days ago

@kennon-mckeever Can this problem be reproduced for all programs? Or only the specified items can be reproduced, could you provide us with your reproduced items?