cmake: EXTERNAL_MPGEN cleanups #147
pull ryanofsky wants to merge 1 commits into bitcoin-core:master from ryanofsky:pr/cgen changing 2 files +6 −6-
ryanofsky commented at 6:01 pm on February 3, 2025: collaboratorSuggested by hebasto in https://github.com/chaincodelabs/libmultiprocess/pull/142#pullrequestreview-2588097796
-
21b92b69c9
cmake: EXTERNAL_MPGEN cleanups
Suggested by Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> in https://github.com/chaincodelabs/libmultiprocess/pull/142#pullrequestreview-2588097796
-
ryanofsky merged this on Feb 3, 2025
-
ryanofsky closed this on Feb 3, 2025
-
in CMakeLists.txt:27 in 21b92b69c9
23@@ -24,7 +24,7 @@ if(Libmultiprocess_ENABLE_CLANG_TIDY) 24 set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_EXECUTABLE}") 25 endif() 26 27-set(EXTERNAL_MPGEN "" CACHE STRING "Use the supplied mpgen binary rather than the one built internally")
theuni commented at 6:12 pm on February 3, 2025:Hmm, I purposefully avoided namespacing this because I was assuming that parent projects would always want to expose the same option and have it be automatically inherited here. Now they’ll have to map it.
Not a big deal to me either way, I guess.
ryanofsky commented at 8:07 pm on February 5, 2025:For reference, code which sets this in depends is implemented in https://github.com/bitcoin/bitcoin/commit/99b7b857d3b8b9ce9bd7501e2480583369740c55 from https://github.com/bitcoin/bitcoin/pull/31741 and seems to work reasonably well
theuni commented at 8:34 pm on February 5, 2025:For depends, sure, it doesn’t matter. But when doing a non-depends cross-build, ccmake shows:
0CAPNPC_CXX_EXECUTABLE 1CAPNP_EXECUTABLE 2... 3Libmultiprocess_EXTERNAL_MPGENwhich is rather inconsistent and non-obvious to builders imo. Seems to me Capnp has it right. For a Core, I wouldn’t expect to see that namespace.
ryanofsky commented at 8:55 pm on February 5, 2025:I see. This suggestion just came from https://github.com/chaincodelabs/libmultiprocess/pull/142#discussion_r1938116078, and I’m happy to rename this to something else or make a different change. Given the other names maybeMPGEN_EXECUTABLEwould be a good name for this.
theuni commented at 3:15 pm on February 6, 2025:I see. This suggestion just came from #142 (comment), and I’m happy to rename this to something else or make a different change. Given the other names maybe
MPGEN_EXECUTABLEwould be a good name for this.Fwiw, I originally picked
EXTERNAL_CAPNPto mirror (what I thought was) the way Capnp handles it. But I see now that Capnp’s is just a bool andCAPNP_EXECUTABLEis the actual path variable. So ACK toMPGEN_EXECUTABLEinstead if we go down this path.
hebasto commented at 3:20 pm on February 6, 2025:So ACK to
MPGEN_EXECUTABLEinstead if we go down this path.So do I.
in cmake/TargetCapnpSources.cmake:70 in 21b92b69c9
68 if(NOT EXISTS "${MPGEN_BINARY}") 69- message(FATAL_ERROR "EXTERNAL_MPGEN: \"${MPGEN_BINARY}\" does not exist.") 70+ message(FATAL_ERROR "Libmultiprocess_EXTERNAL_MPGEN: \"${MPGEN_BINARY}\" does not exist.") 71 endif() 72 elseif(TARGET Libmultiprocess::multiprocess) 73- set(MPGEN_BINARY $<TARGET_FILE:Libmultiprocess::mpgen>)
theuni commented at 6:15 pm on February 3, 2025:I attempted this a bunch of different ways, and with some approach this was necessary, but I forget why. I assume this is fine, thanks for simplifying.theuni commented at 6:16 pm on February 3, 2025: contributorThank you for the cleanups!ryanofsky referenced this in commit 8959938ed4 on Feb 3, 2025ryanofsky referenced this in commit 37fb62c3a5 on Feb 4, 2025ryanofsky referenced this in commit 1d75538a32 on Feb 5, 2025ryanofsky referenced this in commit 250c2ea54d on Feb 7, 2025ryanofsky referenced this in commit 91193005a9 on Feb 7, 2025ryanofsky referenced this in commit 9437e6846f on Feb 7, 2025ryanofsky referenced this in commit a4a8f7a7ba on Feb 7, 2025ryanofsky referenced this in commit 3a95817ece on Feb 10, 2025Sjors referenced this in commit 6aabfcb615 on Feb 10, 2025Sjors referenced this in commit 1746618e08 on Feb 13, 2025ryanofsky referenced this in commit 83e40d3b52 on Feb 24, 2025ryanofsky referenced this in commit 8619f03ec2 on Feb 24, 2025ryanofsky referenced this in commit cbb7b41c20 on Feb 24, 2025fanquake referenced this in commit 01f7715766 on Feb 25, 2025fanquake referenced this in commit ba0a4391ff on Feb 25, 2025janus referenced this in commit 86cb86b050 on Sep 1, 2025
This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-12-04 19:30 UTC
More mirrored repositories can be found on mirror.b10c.me