From 915244b23849035fec39867783a7c32104428fb2 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 24 Jul 2022 16:33:06 +0200 Subject: [PATCH] Add 'rerun-if-changed' directives to build script --- src/build.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/build.rs b/src/build.rs index 29265f5..10d7a94 100644 --- a/src/build.rs +++ b/src/build.rs @@ -134,5 +134,10 @@ fn main() -> Result<()> { // Include the generated files now that the build script has run. println!("cargo:rustc-cfg=generated_boards"); + // Run the build script only if something in move generation might have changed. + println!("cargo:rerun-if-changed=build.rs"); + println!("cargo:rerun-if-changed=movegen/naive/"); + println!("cargo:rerun-if-changed=movegen/wizardry/"); + Ok(()) }