Skip to content

Commit 7025942

Browse files
committed
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.
1 parent 0dd6625 commit 7025942

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

src/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ add_custom_target(generate_build_info
1717
add_library(bitcoin_clientversion OBJECT EXCLUDE_FROM_ALL
1818
clientversion.cpp
1919
)
20-
target_compile_definitions(bitcoin_clientversion
21-
PRIVATE
22-
HAVE_BUILD_INFO
23-
)
2420
target_link_libraries(bitcoin_clientversion
2521
PRIVATE
2622
core_interface

src/clientversion.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@ using util::Join;
2323
const std::string CLIENT_NAME("Satoshi");
2424

2525

26-
#ifdef HAVE_BUILD_INFO
2726
#include <bitcoin-build-info.h>
2827
// The <bitcoin-build-info.h>, which is generated by the build environment (cmake/script/GenerateBuildInfo.cmake),
2928
// could contain only one line of the following:
3029
// - "#define BUILD_GIT_TAG ...", if the top commit is tagged
3130
// - "#define BUILD_GIT_COMMIT ...", if the top commit is not tagged
3231
// - "// No build information available", if proper git information is not available
33-
#endif
3432

3533
//! git will put "#define GIT_COMMIT_ID ..." on the next line inside archives. $Format:%n#define GIT_COMMIT_ID "%H"$
3634

0 commit comments

Comments
 (0)