rust-lang / cmake-rs

Rust build dependency for running cmake
https://docs.rs/cmake
Apache License 2.0
305 stars 121 forks source link

check cmake version before passing the parallel flag #132

Closed MoAlyousef closed 2 years ago

MoAlyousef commented 2 years ago

Hello This PR passes the --version flag to cmake, holds the value in a tuple, then checks whether the version is 3.12 or above.

MoAlyousef commented 2 years ago

Thanks for this, although part of #123 was actually removing code that ran make -jN which means that this is somewhat of a regression where if an older cmake is found then it won't run parallel builds whereas previously before it would.

I don't know of a great way to bridge that though because I'd prefer to not have both systems in place. I suppose not passing --parallel is probably the best option for now.

The makeflags can still be passed with the parallel flag. I've added it in the latest change.

MoAlyousef commented 2 years ago

I've updated the code. Feel free to modify the warning messages.