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

Don't add '-j' argument if parallelJobs <= 1 #2187

Merged
merged 7 commits into from
Oct 21, 2021
Merged

Don't add '-j' argument if parallelJobs <= 1 #2187

merged 7 commits into from
Oct 21, 2021

Conversation

mark-ulrich
Copy link
Contributor

This change addresses item #1958

This changes behavior

The following changes are proposed:

  • Respect the parallelJobs configuration to avoid parallel builds when it is configured to less than 2

The purpose of this change

Previously, the '-j' option would be passed to CMake even if the parellelJobs option was set to 1. This could cause issues with the build system. For example, passing the '-j' argument will cause CMake to actively remove the '/MP' flag in Visual C++, effectively disabling multi-processor compilation.

Other Notes/Information

Perhaps it would be best to add a configuration option to disable this automatic passing of '-j' altogether. However, this fix is sufficient when setting parellelJobs to 1.

@ghost
Copy link

ghost commented Oct 18, 2021

CLA assistant check
All CLA requirements met.

@bobbrow
Copy link
Member

bobbrow commented Oct 21, 2021

So the intended behavior change in the setting is that you can now set the parallelJobs to 1 to disable our passing of -j to CMake? We should update package.nls.json to document this.

@bobbrow bobbrow merged commit 1a69765 into microsoft:develop Oct 21, 2021
@andreeis andreeis added this to the 1.9.1 milestone Oct 25, 2021
@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.

3 participants