-
Notifications
You must be signed in to change notification settings - Fork 39.2k
cmake: Move IPC tests to ipc/test
#33774
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
Changes from all commits
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 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,7 +9,7 @@ add_library(bitcoin_ipc STATIC EXCLUDE_FROM_ALL | |||||||||||||||||
| process.cpp | ||||||||||||||||||
| ) | ||||||||||||||||||
|
|
||||||||||||||||||
| target_capnp_sources(bitcoin_ipc ${PROJECT_SOURCE_DIR} | ||||||||||||||||||
| target_capnp_sources(bitcoin_ipc ${CMAKE_CURRENT_SOURCE_DIR} | ||||||||||||||||||
|
Contributor
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. In commit "cmake, test: Improve locality of This change should be correct, but I'm confused about how it was working before. This change causes includes in generated files such -#include <src/ipc/capnp/common.capnp.h> // IWYU pragma: keep
+#include <capnp/common.capnp.h> // IWYU pragma: keepSo that seems good. But I don't understand why the
Member
Author
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.
This code is responsible for adding the required include path: bitcoin/src/ipc/libmultiprocess/cmake/TargetCapnpSources.cmake Lines 96 to 103 in 75baff9
|
||||||||||||||||||
| capnp/common.capnp | ||||||||||||||||||
| capnp/echo.capnp | ||||||||||||||||||
| capnp/init.capnp | ||||||||||||||||||
|
|
@@ -22,4 +22,27 @@ target_link_libraries(bitcoin_ipc | |||||||||||||||||
| univalue | ||||||||||||||||||
| ) | ||||||||||||||||||
|
|
||||||||||||||||||
| if(BUILD_TESTS) | ||||||||||||||||||
| # bitcoin_ipc_test library target is defined here in src/ipc/CMakeLists.txt | ||||||||||||||||||
| # instead of src/ipc/test/CMakeLists.txt so capnp files in src/ipc/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/ipc, not src/ipc/test/ | ||||||||||||||||||
| add_library(bitcoin_ipc_test STATIC EXCLUDE_FROM_ALL | ||||||||||||||||||
| test/ipc_test.cpp | ||||||||||||||||||
| ) | ||||||||||||||||||
| target_capnp_sources(bitcoin_ipc_test ${CMAKE_CURRENT_SOURCE_DIR} | ||||||||||||||||||
| test/ipc_test.capnp | ||||||||||||||||||
| ) | ||||||||||||||||||
| add_dependencies(bitcoin_ipc_test bitcoin_ipc_headers) | ||||||||||||||||||
|
|
||||||||||||||||||
| target_link_libraries(bitcoin_ipc_test | ||||||||||||||||||
| PRIVATE | ||||||||||||||||||
| core_interface | ||||||||||||||||||
| univalue | ||||||||||||||||||
| Boost::headers | ||||||||||||||||||
| ) | ||||||||||||||||||
| endif() | ||||||||||||||||||
|
|
||||||||||||||||||
| configure_file(.clang-tidy.in .clang-tidy USE_SOURCE_PERMISSIONS COPYONLY) | ||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Copyright (c) 2023-present The Bitcoin Core developers | ||
| # Distributed under the MIT software license, see the accompanying | ||
| # file COPYING or https://opensource.org/license/mit/. | ||
|
|
||
| # Do not use generator expressions in test sources because the | ||
| # SOURCES property is processed to gather test suite macros. | ||
| target_sources(test_bitcoin | ||
| PRIVATE | ||
| ipc_tests.cpp | ||
| ) | ||
|
|
||
| target_link_libraries(test_bitcoin bitcoin_ipc_test bitcoin_ipc) |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.