Skip to content

add parallel flag depending on cmake version. As well as MP flag for VS #107

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

Merged
merged 4 commits into from
Dec 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ impl Config {
parallel_flags = Some(format!("-j{}", s));
}
Some(ref g) if g.contains("Visual Studio") => {
parallel_flags = Some(format!("/m:{}", s));
parallel_flags = Some(format!("/MP{}", s));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To confirm, you've seen this have parallelized effects locally for yourself? I'm not sure how cmake invokes cl.exe but it looks like this only works if cl.exe is fed multiple files at once? I'm also not sure what the previous /m option was actually...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I haven't come across the m flag before personally.

}
Some(ref g) if g.contains("NMake") => {
// NMake creates `Makefile`s, but doesn't understand `-jN`.
Expand Down