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

Honor parallelsJobs value when the generator is a Visual Studio one (multicore support) #975

Conversation

tonka3000
Copy link
Contributor

This changes

the perfomance of a build when the cmake generator is Visual Studio one f.e. Visual Studio 15 2017 Win64 because cmake build single-core by default. Adding /maxcpucount as additional flag (it's the same flag as -j in gcc) will activate multicore build (when the Visual Studio solution is generated by Visual Studio ´/maxcpucount´ is the default).

This PR always add the number of cores calculate by this extension (as defined with cmake.parallelJobs setting), so the flag always looks like f.e /maxcpucount:8. msbuild would have also the option to detect the cores by itself with /maxcpucount, but the implementation for that in this extension would be much more complicated.

The purpose of this change

Multicore-build per default => better speed in most cases

@bobbrow bobbrow merged commit 13e9767 into microsoft:develop Dec 28, 2019
@bobbrow
Copy link
Member

bobbrow commented Dec 28, 2019

Thank you!

@tonka3000 tonka3000 deleted the honor-paralleljobs-setting-in-vs-generators branch January 7, 2020 12:03
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants