File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -325,6 +325,22 @@ if(WITH_MULTIPROCESS)
325
325
$< TARGET_NAME_IF_EXISTS:bitcoin_wallet>
326
326
)
327
327
list (APPEND installable_targets bitcoin-node )
328
+
329
+ if (BUILD_TESTS )
330
+ # bitcoin_ipc_test library target is defined here in src/CMakeLists.txt
331
+ # instead of src/test/CMakeLists.txt so capnp files in src/test/ are able to
332
+ # reference capnp files in src/ipc/capnp/ by relative path. The Cap'n Proto
333
+ # compiler only allows importing by relative path when the importing and
334
+ # imported files are underneath the same compilation source prefix, so the
335
+ # source prefix must be src/, not src/test/
336
+ add_library (bitcoin_ipc_test STATIC EXCLUDE_FROM_ALL
337
+ test /ipc_test.cpp
338
+ )
339
+ target_capnp_sources (bitcoin_ipc_test ${PROJECT_SOURCE_DIR}
340
+ test /ipc_test.capnp
341
+ )
342
+ add_dependencies (bitcoin_ipc_test bitcoin_ipc_headers )
343
+ endif ()
328
344
endif ()
329
345
330
346
Original file line number Diff line number Diff line change @@ -160,14 +160,6 @@ if(ENABLE_WALLET)
160
160
endif ()
161
161
162
162
if (WITH_MULTIPROCESS )
163
- add_library (bitcoin_ipc_test STATIC EXCLUDE_FROM_ALL
164
- ipc_test.cpp
165
- )
166
-
167
- target_capnp_sources (bitcoin_ipc_test ${PROJECT_SOURCE_DIR}
168
- ipc_test.capnp
169
- )
170
-
171
163
target_link_libraries (bitcoin_ipc_test
172
164
PRIVATE
173
165
core_interface
You can’t perform that action at this time.
0 commit comments