mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-19 05:45:05 +01: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
@ -325,6 +325,22 @@ if(WITH_MULTIPROCESS)
|
||||
$<TARGET_NAME_IF_EXISTS:bitcoin_wallet>
|
||||
)
|
||||
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()
|
||||
|
||||
|
||||
|
@ -160,14 +160,6 @@ if(ENABLE_WALLET)
|
||||
endif()
|
||||
|
||||
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
|
||||
PRIVATE
|
||||
core_interface
|
||||
|
Loading…
Reference in New Issue
Block a user