build: Add explicit dependency for codegen#5640
Conversation
|
Tagging @niermann999. |
|
Does it not do that if it depends on the detray interface target? I'm changing detray to also contain compiled code in #5641, in that case at least it should trigger the generation, shouldn't it? |
With the current detray CMake setup, the generation of this code is not triggered, even when we export a detray interface target. Let me see what the mechanism is with #5641. |
|
Confirmed that #5641 also makes this problem go away. |
|
@paulgessinger @niermann999 as far as I can tell there are actually 3 solutions to this problem:
Please let me know what y'all think. |
|
@stephenswat I like it. If we raise the CMake floor maybe we should do it in a separate PR though. |
|
Waiting for #5647 so we can refactor this. |
d36be50 to
264078a
Compare
264078a to
b66ac75
Compare
This commit establishes an explicit dependency between the targets we use in the code generation and the generated files. By default, CMake establishes no such dependency for INTERFACE targets, but CMake 3.19 allows us to add private sources to INTERFACE targets. This ensures that when ACTS is built, the codegen files are always ready to be installed. This is especially important for detray, which may opt not to even generate the files if no target depends on them, but they should still be available to detray clients.
b66ac75 to
9fd2fd8
Compare
|



This commit establishes an explicit dependency between the targets we use in the code generation and the generated files. By default, CMake establishes no such dependency for INTERFACE targets, but CMake 3.19 allows us to add private sources to INTERFACE targets. This ensures that when ACTS is built, the codegen files are always ready to be installed. This is especially important for detray, which may opt not to even generate the files if no target depends on them, but they should still be available to detray clients.