cmake: Make `codegen` target dependent on `generate_build_info`
What changed, and why it matters
This is a tiny CMake build-system change. It removes the EXCLUDE_FROM_ALL flag from a static library so that a code-generation target is built when needed. There is no indication this affects runtime security, wallet funds, network consensus, or user data.
No security action required. Treat as a normal build-system maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit makes two related CMake adjustments in src/CMakeLists.txt: (1) it makes the existing codegen custom target depend on generate_build_info, and (2) it removes EXCLUDE_FROM_ALL from the bitcoin_clientversion static library so the generated build-info header is produced reliably during normal builds. The diff shown only contains the second half (removing EXCLUDE_FROM_ALL). This is a build-system correctness/reliability fix, not a code-level security patch.
Changed components
src/CMakeLists.txt build configurationInspect captured patch +1 / −1
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 47aee937..43d67f40 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -43,7 +43,7 @@ add_custom_target(generate_build_info
COMMENT "Generating bitcoin-build-info.h"
VERBATIM
)
-add_library(bitcoin_clientversion STATIC EXCLUDE_FROM_ALL
+add_library(bitcoin_clientversion STATIC
clientversion.cpp
)
target_link_libraries(bitcoin_clientversion
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.