mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
build: Make bitcoin_ipc_test depend on bitcoin_ipc
This change is needed to allow generated capnp code in src/ipc/capnp/ to be used in unit tests for better test coverage in upcoming commits.
This commit is contained in:
parent
070e6a32d5
commit
206c6e78ee
2 changed files with 16 additions and 8 deletions
|
@ -325,6 +325,22 @@ if(WITH_MULTIPROCESS)
|
||||||
$<TARGET_NAME_IF_EXISTS:bitcoin_wallet>
|
$<TARGET_NAME_IF_EXISTS:bitcoin_wallet>
|
||||||
)
|
)
|
||||||
list(APPEND installable_targets bitcoin-node)
|
list(APPEND installable_targets bitcoin-node)
|
||||||
|
|
||||||
|
if(BUILD_TESTS)
|
||||||
|
# bitcoin_ipc_test library target is defined here in src/CMakeLists.txt
|
||||||
|
# instead of src/test/CMakeLists.txt so capnp files in src/test/ are able to
|
||||||
|
# reference capnp files in src/ipc/capnp/ by relative path. The Cap'n Proto
|
||||||
|
# compiler only allows importing by relative path when the importing and
|
||||||
|
# imported files are underneath the same compilation source prefix, so the
|
||||||
|
# source prefix must be src/, not src/test/
|
||||||
|
add_library(bitcoin_ipc_test STATIC EXCLUDE_FROM_ALL
|
||||||
|
test/ipc_test.cpp
|
||||||
|
)
|
||||||
|
target_capnp_sources(bitcoin_ipc_test ${PROJECT_SOURCE_DIR}
|
||||||
|
test/ipc_test.capnp
|
||||||
|
)
|
||||||
|
add_dependencies(bitcoin_ipc_test bitcoin_ipc_headers)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -160,14 +160,6 @@ if(ENABLE_WALLET)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_MULTIPROCESS)
|
if(WITH_MULTIPROCESS)
|
||||||
add_library(bitcoin_ipc_test STATIC EXCLUDE_FROM_ALL
|
|
||||||
ipc_test.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_capnp_sources(bitcoin_ipc_test ${PROJECT_SOURCE_DIR}
|
|
||||||
ipc_test.capnp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(bitcoin_ipc_test
|
target_link_libraries(bitcoin_ipc_test
|
||||||
PRIVATE
|
PRIVATE
|
||||||
core_interface
|
core_interface
|
||||||
|
|
Loading…
Add table
Reference in a new issue