Skip to content

Commit d46b8b2

Browse files
committed
don't use openmp on windows
1 parent 2abb6ea commit d46b8b2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

build.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
use cmake::Config;
21
use std::env;
32
use std::path::PathBuf;
43

4+
use cmake::Config;
5+
56
fn main() {
67
let dst = Config::new("HiGHS")
7-
.define("OPENMP", "ON")
88
.define("FAST_BUILD", "ON")
99
.define("SHARED", "OFF")
1010
.build();
@@ -45,6 +45,8 @@ fn main() {
4545
println!("cargo:rustc-link-search=native={}/lib", dst.display());
4646
println!("cargo:rustc-link-lib=static=highs");
4747
println!("cargo:rustc-link-lib=dylib=stdc++");
48-
println!("cargo:rustc-link-lib=dylib=gomp");
48+
if !cfg!(target_os = "windows") {
49+
println!("cargo:rustc-link-lib=dylib=gomp");
50+
}
4951
println!("cargo:rerun-if-changed=HiGHS/src/interfaces/highs_c_api.h");
5052
}

0 commit comments

Comments
 (0)