build: drop superfluous HAVE_BUILD_INFO define

bitcoin-build-info.h should always be generated before clientversion.cpp
is compiled due to the following explicit dependency in src/CMakeLists.txt:

add_dependencies(bitcoin_clientversion generate_build_info)

Hence there is no need to gate the inclusion of that header with an
extra define.
This commit is contained in:
Sebastian Falbesoner committed 2024-09-19 17:59:16 +02:00
1 parent 0dd662510c
commit 7025942687
2 files changed
-6

No files matched your search

-4
View File
@@ -17,10 +17,6 @@ add_custom_target(generate_build_info
add_library(bitcoin_clientversion OBJECT EXCLUDE_FROM_ALL
clientversion.cpp
)
target_compile_definitions(bitcoin_clientversion
PRIVATE
HAVE_BUILD_INFO
)
target_link_libraries(bitcoin_clientversion
PRIVATE
core_interface
-2
View File
@@ -23,14 +23,12 @@ using util::Join;
const std::string CLIENT_NAME("Satoshi");
#ifdef HAVE_BUILD_INFO
#include <bitcoin-build-info.h>
// The <bitcoin-build-info.h>, which is generated by the build environment (cmake/script/GenerateBuildInfo.cmake),
// could contain only one line of the following:
// - "#define BUILD_GIT_TAG ...", if the top commit is tagged
// - "#define BUILD_GIT_COMMIT ...", if the top commit is not tagged
// - "// No build information available", if proper git information is not available
#endif
//! git will put "#define GIT_COMMIT_ID ..." on the next line inside archives. $Format:%n#define GIT_COMMIT_ID "%H"$