-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: Avoid overlinking #34
Changes from all commits
0f0dcca
e4b4fdd
9a0a914
ab9853a
8342981
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Copyright (c) 2023 The Bitcoin Core developers | ||
# Copyright (c) 2023-present The Bitcoin Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
# file COPYING or https://opensource.org/license/mit/. | ||
|
||
add_library(test_util STATIC EXCLUDE_FROM_ALL | ||
blockfilter.cpp | ||
|
@@ -17,22 +17,13 @@ add_library(test_util STATIC EXCLUDE_FROM_ALL | |
transaction_utils.cpp | ||
txmempool.cpp | ||
validation.cpp | ||
$<$<BOOL:${ENABLE_WALLET}>:${PROJECT_SOURCE_DIR}/src/wallet/test/util.cpp> | ||
) | ||
|
||
target_link_libraries(test_util | ||
PRIVATE | ||
core | ||
bitcoin_common | ||
bitcoin_node | ||
leveldb | ||
univalue | ||
Boost::headers | ||
PUBLIC | ||
univalue | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was going to comment that I'd rather see this be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Placing |
||
) | ||
|
||
if(ENABLE_WALLET) | ||
target_sources(test_util | ||
PRIVATE | ||
../../wallet/test/util.cpp | ||
) | ||
endif() | ||
|
||
target_link_libraries(test_util PRIVATE core) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Copyright (c) 2023 The Bitcoin Core developers | ||
# Copyright (c) 2023-present The Bitcoin Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
# file COPYING or https://opensource.org/license/mit/. | ||
|
||
add_library(bitcoin_zmq STATIC | ||
zmqabstractnotifier.cpp | ||
|
@@ -16,7 +16,6 @@ target_compile_definitions(bitcoin_zmq | |
target_link_libraries(bitcoin_zmq | ||
PRIVATE | ||
core | ||
leveldb | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Totally unrelated to CMake/this PR, but univalue is an unfortunate dependency for zmq. Seems to me it'd make sense to move |
||
univalue | ||
$<TARGET_NAME_IF_EXISTS:libzmq> | ||
$<TARGET_NAME_IF_EXISTS:PkgConfig::libzmq> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to go ahead and use
TARGET_IF_NAME_EXISTS
fortarget_sources
here as well? Seems odd to leave only one behind.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Done.