Skip to content

Commit 5f9218b

Browse files
authored
Revert setting CMAKE_SYSTEM_NAME=Linux when targeting Linux (#139)
Previously, this would set SYSTEM_NAME unconditionally whenever targeting Linux. Unfortunately, Cmake unsets some other variables when SYSTEM_NAME is set; in particular `CMAKE_SYSTEM_VERSION` and `CMAKE_SYSTEM_PROCESSOR`. To avoid regressing other builds, this reverts the change; builds which want to cross-compile to linux can set `SYSTEM_NAME` themselves.
1 parent ea36e96 commit 5f9218b

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -637,10 +637,6 @@ impl Config {
637637
cmd.arg("-DCMAKE_OSX_SYSROOT=/");
638638
cmd.arg("-DCMAKE_OSX_DEPLOYMENT_TARGET=");
639639
}
640-
} else if target.contains("linux") {
641-
if !self.defined("CMAKE_SYSTEM_NAME") {
642-
cmd.arg("-DCMAKE_SYSTEM_NAME=Linux");
643-
}
644640
}
645641
if let Some(ref generator) = generator {
646642
cmd.arg("-G").arg(generator);

0 commit comments

Comments
 (0)