mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
cmake: Avoid using OBJECT
libraries
`OBJECT` libraries have historically exhibited poor support for various features, both in the past and now. For example, see one of the latest issues: - https://gitlab.kitware.com/cmake/cmake/-/issues/24058 Furthermore, CMake maintainers have acknowledged: > In general, however, where there is a choice, static libraries will > typically be the more convenient choice in CMake projects. This change: 1. Converts the `bitcoin_clientversion` library from an `OBJECT` library to a `STATIC` library. 2. Removes an obsolete workaround.
This commit is contained in:
parent
28dec6c5f8
commit
3fd64efb43
2 changed files with 1 additions and 4 deletions
|
@ -13,7 +13,7 @@ add_custom_target(generate_build_info
|
|||
COMMENT "Generating bitcoin-build-info.h"
|
||||
VERBATIM
|
||||
)
|
||||
add_library(bitcoin_clientversion OBJECT EXCLUDE_FROM_ALL
|
||||
add_library(bitcoin_clientversion STATIC EXCLUDE_FROM_ALL
|
||||
clientversion.cpp
|
||||
)
|
||||
target_link_libraries(bitcoin_clientversion
|
||||
|
|
|
@ -36,9 +36,6 @@ add_library(bitcoin_util STATIC EXCLUDE_FROM_ALL
|
|||
../sync.cpp
|
||||
)
|
||||
|
||||
# Workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/24058
|
||||
set_target_properties(bitcoin_util PROPERTIES OPTIMIZE_DEPENDENCIES OFF)
|
||||
|
||||
target_link_libraries(bitcoin_util
|
||||
PRIVATE
|
||||
core_interface
|
||||
|
|
Loading…
Add table
Reference in a new issue