From 7fddec266546de371021d82d2876b6d90ebfd8aa Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Mon, 15 Jan 2024 17:02:02 +0100 Subject: [PATCH] Make cli faster by reruning c_operator_type compilation dependent on modification of its source code --- apis/c/operator/build.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apis/c/operator/build.rs b/apis/c/operator/build.rs index a9b4adfd..6d45fd00 100644 --- a/apis/c/operator/build.rs +++ b/apis/c/operator/build.rs @@ -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"); }