Browse Source

Make cli faster by reruning c_operator_type compilation dependent on modification of its source code

tags/v0.3.2-rc2
haixuanTao 2 years ago
parent
commit
7fddec2665
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      apis/c/operator/build.rs

+ 3
- 2
apis/c/operator/build.rs View File

@@ -2,10 +2,11 @@ use std::path::Path;

fn main() {
dora_operator_api_types::generate_headers(Path::new("operator_types.h"))
.expect("failed to create operator_api.h");
.expect("failed to create operator_types.h");

// don't rebuild on changes (otherwise we rebuild on every run as we're
// writing the `operator_types.h` file; cargo will still rerun this script
// when the `dora_operator_api_types` crate changes)
println!("cargo:rerun-if-changed=");
println!("cargo:rerun-if-changed=../../rust/operator/types/src/lib.rs");
println!("cargo:rerun-if-changed=operator_api.h");
}

Loading…
Cancel
Save