rust-lang / cmake-rs

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

Don't set CMAKE_SYSTEM_NAME when using the Visual Studio generator #193

Open jrose-signal opened 9 months ago

jrose-signal commented 9 months ago

Setting CMAKE_SYSTEM_NAME and CMAKE_SYSTEM_PROCESSOR is often enough for CMake to handle cross-compilation even without a toolchain file, but it gets in the way of generators that handle cross-compilation on their own (in Visual Studio's case, using the -T "toolset" option).

Narrow fix for the issue I brought up in https://github.com/rust-lang/cmake-rs/pull/158#issuecomment-1544695163. Possible fix for #171 as well, if it does turn out to be the same thing.

jrose-signal commented 9 months ago

(Test failures are also happening on upstream.)