Include corrosion's cargo build dir in the clean target. (#21820)
vkalintiris committed
Feb 26, 2026 at 08:59 UTC
e589cc3250045d256b80f26ac9ace4dfc61a127b
1 file changed
+6
CMakeLists.txt
+6
@@ -203,6 +203,12 @@ if(ENABLE_NETDATA_JOURNAL_FILE_READER OR ENABLE_PLUGIN_OTEL OR ENABLE_PLUGIN_OTE
203
)
204
FetchContent_MakeAvailable(Corrosion)
205
206
+ # Corrosion places cargo build artifacts under ${CMAKE_BINARY_DIR}/cargo/
207
+ # (see Corrosion.cmake cargo_target_dir). Register it for cleanup so that
208
+ # `ninja clean` removes it. If a future Corrosion version changes this
209
+ # path, this line must be updated to match.
210
+ set_directory_properties(PROPERTIES ADDITIONAL_CLEAN_FILES "${CMAKE_BINARY_DIR}/cargo")
211
+
212
if(ENABLE_NETDATA_JOURNAL_FILE_READER)
213
corrosion_import_crate(MANIFEST_PATH src/crates/jf/Cargo.toml
214
CRATES journal_reader_ffi)