Skip to content

Commit ec731d4

Browse files
committed
fix rerun condition
Signed-off-by: Alexander Droste <[email protected]>
1 parent 074a0b8 commit ec731d4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

vortex-duckdb-ext/build.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,14 @@ fn main() {
145145
.expect("error: Unable to generate bindings for vortex.h")
146146
.write_to_file(crate_dir.join("include/vortex.h"));
147147

148-
for entry in walkdir::WalkDir::new("cpp/") {
149-
println!("cargo:rerun-if-changed={}", entry.unwrap().path().display());
148+
// Watch C/C++ source files for changes.
149+
for entry in walkdir::WalkDir::new("cpp/").into_iter().flatten() {
150+
if entry
151+
.path()
152+
.extension()
153+
.map_or(false, |ext| ext == "cpp" || ext == "h" || ext == "hpp")
154+
{
155+
println!("cargo:rerun-if-changed={}", entry.path().display());
156+
}
150157
}
151-
println!("cargo:rerun-if-changed=src/cpp.rs");
152158
}

0 commit comments

Comments
 (0)