[cmake] Make explicit that all dictionaries depend on Core.pcm - #23207
[cmake] Make explicit that all dictionaries depend on Core.pcm#23207ferdymercury wants to merge 7 commits into
Conversation
By pcanal They depend on it implicitly and not expressing leads to missing rebuilds as seen at: root-project#23046 when no ARG_DEPENDENCIES are specified at all
Co-authored-by: Philippe Canal <pcanal@fnal.gov>
Test Results 23 files 23 suites 3d 16h 26m 44s ⏱️ Results for commit 9e39f7f. ♻️ This comment has been updated with latest results. |
| if(ARG_MODULE AND NOT ARG_MODULE STREQUAL "Core") | ||
| list(INSERT ARG_DEPENDENCIES 0 Core) | ||
| list(REMOVE_DUPLICATES ARG_DEPENDENCIES) | ||
| endif() | ||
| foreach(dep ${ARG_DEPENDENCIES}) | ||
| # Whether <dep> provides a dictionary/pcm is decided at generation time |
There was a problem hiding this comment.
I liked your first attempt to put Core in the for loop:
| if(ARG_MODULE AND NOT ARG_MODULE STREQUAL "Core") | |
| list(INSERT ARG_DEPENDENCIES 0 Core) | |
| list(REMOVE_DUPLICATES ARG_DEPENDENCIES) | |
| endif() | |
| foreach(dep ${ARG_DEPENDENCIES}) | |
| # Whether <dep> provides a dictionary/pcm is decided at generation time | |
| foreach(dep Core ${ARG_DEPENDENCIES}) | |
| if(dep STREQUAL ARG_MODULE) | |
| continue() # Don't depend on self | |
| endif() | |
| # Whether <dep> provides a dictionary/pcm is decided at generation time |
I think this should work because ${dep} will be compared to "ARG_MODULE" if the latter is not a variable.
There was a problem hiding this comment.
The drawback of this is that there might be already Core in ARG_DEPENDENCIES so we would pass twice for it in the loop
There was a problem hiding this comment.
I liked your first attempt to put Core in the for loop:
Then it gets added for Core it self and that can not work.
pcanal
left a comment
There was a problem hiding this comment.
It looks good to me ... but still need another approval since this is partially my own code :)
By pcanal
They depend on it implicitly and not expressing leads to missing rebuilds as seen at: #23046
when no ARG_DEPENDENCIES are specified at all