Repository navigation
cmake: Pass installed include dir to mpgen - #375
Open
VijayabaskarR-06 wants to merge 1 commit into
Open
VijayabaskarR-06 wants to merge 1 commit into
VijayabaskarR-06 wants to merge 1 commit into
Conversation
mpgen finds /mp/proxy.capnp using the CMAKE_INSTALL_PREFIX that was set when it was built. If libmultiprocess is installed somewhere else, for example with `cmake --install build --prefix ~/.local`, or the install is moved, code generation fails with "Import failed: /mp/proxy.capnp". When target_capnp_sources uses the imported Libmultiprocess::mpgen target, pass its include directory to mpgen as an import path. That path comes from the installed package location, so it is correct wherever the package ends up. Builds that use libmultiprocess as a subdirectory already pass MP_INCLUDE_DIR and are unchanged. Fixes bitcoin-core#134
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline and AI policy for information on the review process. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #134.
mpgen was looking for proxy.capnp using the path from when libmultiprocess was built. If the library was installed with a different prefix then the downstream builds failed with Import failed: /mp/proxy.capnp.
This change passes the installed include path from Libmultiprocess::mpgen to mpgen so it can find the file after installation.
Subdirectory builds and builds using MPGEN_EXECUTABLE are unchanged.
I tested this with Bitcoin Core's bitcoin_ipc target. It works with this change and also compared it with main !