Commit 0c2ac4d
committed
Merge #142: build: add option for external mpgen binary
75cf04a build: add option for external mpgen binary (Cory Fields)
Pull request description:
The parent project or user can supply `EXTERNAL_MPGEN`, which will override the one set here. If not set, the internally built one is used instead.
This is useful for cross builds, especially when using libmultiprocess as a subdirectory. Parent projects can similarly define a cache var.
Note that the internal binary is still built, but it can be skipped by building the multiprocess target directly.
This is the simplest impl of this I could come up with. Trying to pass an optional option for the binary into `target_capnp_sources` is not very ergonomic with CMake, so I've opted for just using a global here instead.
It would probably make sense to disable the internal mpgen target if the external option is used, but that adds a good bit of complexity, so I haven't done it here. Happy to do it as a follow-up if desired.
ACKs for top commit:
ryanofsky:
Code review ACK 75cf04a Looks great!
hebasto:
Approach ACK 75cf04a.
Tree-SHA512: dafcebc17f66a3e1b4ea11c453a1193f58874585d77ee50dcd59d8353171bdeaab49cf9968cd4e122fd7bf707e5ee153343d6bc9c4d2732fbb775559f53870d42 files changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
65 | 73 | | |
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
69 | 77 | | |
70 | 78 | | |
71 | | - | |
| 79 | + | |
72 | 80 | | |
73 | 81 | | |
74 | 82 | | |
| |||
0 commit comments