Skip to content

Commit

Permalink
fix: use cargo: syntax for backwards compat
Browse files Browse the repository at this point in the history
  • Loading branch information
chrjabs committed Oct 15, 2024
1 parent 7a2397e commit 6dae65c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cadical/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ fn main() {

for ext in ["h", "cpp"] {
for file in glob(&format!("cppsrc/*.{ext}")).unwrap() {
println!("cargo::rerun-if-changed={}", file.unwrap().display());
println!("cargo:rerun-if-changed={}", file.unwrap().display());
}
}

Expand Down
8 changes: 4 additions & 4 deletions capi/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ fn main() {
.expect("Unable to generate bindings")
.write_to_file("rustsat.h");

println!("cargo::rerun-if-changed=cbindgen.toml");
println!("cargo::rerun-if-changed=src/capi.rs");
println!("cargo:rerun-if-changed=cbindgen.toml");
println!("cargo:rerun-if-changed=src/capi.rs");

// Setup inline-c
let include_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let ld_dir = target_dir().unwrap();

let cflags = format!("-I{include_dir} -D_DEBUG -D_CRT_SECURE_NO_WARNINGS");
println!("cargo::rustc-env=INLINE_C_RS_CFLAGS={cflags}");
println!("cargo:rustc-env=INLINE_C_RS_CFLAGS={cflags}");

let ldflags = format!("-L{L} -lrustsat_capi", L = ld_dir.to_string_lossy());
let ldflags = format!("{ldflags} -llzma -lbz2");
println!("cargo::rustc-env=INLINE_C_RS_LDFLAGS={ldflags}");
println!("cargo:rustc-env=INLINE_C_RS_LDFLAGS={ldflags}");
}

// https://github.com/rust-lang/cargo/issues/9661#issuecomment-1722358176
Expand Down

0 comments on commit 6dae65c

Please sign in to comment.