From e3c594c250fd4cd01ef8ddec9994858f8bc55831 Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 3 Jul 2026 18:38:07 -0400 Subject: [PATCH] Explain why we do not use `file(GLOB ext_projects CONFIGURE_DEPENDS "external/*.cfg")` --- test/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d7a76da7..9e78fb93 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -45,7 +45,10 @@ add_test(NAME fetch-nonfree-deps set_tests_properties(fetch-nonfree-deps PROPERTIES FIXTURES_SETUP "nonfree-repos" LABELS "external;nonfree") -file(GLOB ext_projects "external/*.cfg") # This will not be re-computed if a new project is added! You must manually reconfigure. +# If a new external project is added, you must manually reconfigure! +# We do not use `GLOB ... CONFIGURE_DEPENDS` to avoid this because it would incur additional +# costs on each build, and the set of external/*.cfg files is very rarely changed. +file(GLOB ext_projects "external/*.cfg") foreach(cfg_file IN LISTS ext_projects) cmake_path(GET cfg_file STEM LAST_ONLY project) # Extract the project's name from the config file's name.