diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2024-09-09 23:20:12 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2024-09-19 17:57:36 +0200 |
commit | 0dd662510c52b202f7136fbcb32ed3864b52b50b (patch) | |
tree | 3405556f2b899a81435ac7c64ad2a37f4bb406fa /src | |
parent | 6fc4692797121b54de0c54e5b09ee47f322c038a (diff) |
build: drop obj/ subdir for generated build.h, rename to bitcoin-build-info.h
Now that this file is not in a subfolder anymore, prefix it with
"bitcoin-" to avoid potential collisions. Also add "info" for a more
descriptive name.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 10 | ||||
-rw-r--r-- | src/clientversion.cpp | 4 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 895c17541f..6b0cf0101d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,14 +8,10 @@ include(AddWindowsResources) configure_file(${PROJECT_SOURCE_DIR}/cmake/bitcoin-config.h.in config/bitcoin-config.h USE_SOURCE_PERMISSIONS @ONLY) include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) -# TODO: After the transition from Autotools to CMake, the obj/ subdirectory -# could be dropped as its only purpose was to separate a generated header -# from source files. add_custom_target(generate_build_info - BYPRODUCTS ${PROJECT_BINARY_DIR}/src/obj/build.h - COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/src/obj - COMMAND ${CMAKE_COMMAND} -DBUILD_INFO_HEADER_PATH=${PROJECT_BINARY_DIR}/src/obj/build.h -DSOURCE_DIR=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/cmake/script/GenerateBuildInfo.cmake - COMMENT "Generating obj/build.h" + BYPRODUCTS ${PROJECT_BINARY_DIR}/src/bitcoin-build-info.h + COMMAND ${CMAKE_COMMAND} -DBUILD_INFO_HEADER_PATH=${PROJECT_BINARY_DIR}/src/bitcoin-build-info.h -DSOURCE_DIR=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/cmake/script/GenerateBuildInfo.cmake + COMMENT "Generating bitcoin-build-info.h" VERBATIM ) add_library(bitcoin_clientversion OBJECT EXCLUDE_FROM_ALL diff --git a/src/clientversion.cpp b/src/clientversion.cpp index 017366543d..0fd51577a3 100644 --- a/src/clientversion.cpp +++ b/src/clientversion.cpp @@ -24,8 +24,8 @@ const std::string CLIENT_NAME("Satoshi"); #ifdef HAVE_BUILD_INFO -#include <obj/build.h> -// The <obj/build.h>, which is generated by the build environment (cmake/script/GenerateBuildInfo.cmake), +#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 |