[cmake] explicit feature=OFF should have hierarchical priority over cached or explicit builtin_feature=ON v2#18467
[cmake] explicit feature=OFF should have hierarchical priority over cached or explicit builtin_feature=ON v2#18467ferdymercury wants to merge 7 commits intoroot-project:masterfrom
Conversation
|
@pcanal I have tried to follow your suggestion. My question now is, how do I prevent enabling fftw3=ON if I passed explicitly -Dfftw3=OFF ? Right now the sequence still leaves fftw3 ON. Do I need to do something like https://stackoverflow.com/a/54302498/7471760 or rather https://stackoverflow.com/a/61986176/7471760? Sth like: |
|
Try without the |
Test Results 18 files 18 suites 3d 23h 20m 26s ⏱️ For more details on these failures, see this check. Results for commit 4a847a9. ♻️ This comment has been updated with latest results. |
I tried and it does not solve the issue. Probably because the default option fftw3=OFF, so that has priority over the cache? So without force -Dbuiltin_fftw3=ON does not turn fftw3=ON. I tried also NOT DEFINED CACHE, to no avail. It seems that this post is relevant: But then we are back to the debate... is this extra complexity worth or can we stick with v1 #18413? |
Fixes https://its.cern.ch/jira/browse/ROOT-10743 feature=ON can force-enable builtin_feature=OFF, but not the other way round, a warning is issued in that case now instead of silently enabling. This prevents automatic enablings of features that the user can not disable unless he writes feature=OFF builtin_feature=OFF.
|
@ferdymercury, with yours and our recent work on the builtins, can we close this one? |
Hmmm not really. This still fails: cmake -Dbuiltin_fftw3=ON ../root_src/ The solution is easy, if the ROOT team agrees to this change of behavior: -Dbuiltin_feature=ON is ignored if -Dfeature=OFF or if -Dfeature=UNSET (a warning will be issued) Otherwise a more complex solution is needed. Considering that builtins are supposed to be the 'last exception' and that one should use system packages, I vote for the more simple solution. Less CMake lines of codes to maintain, not worth the complexity for a corner case scenario, that is anyway buggy in the current state. |
This Pull request:
Changes or fixes:
This is v2 of #18413
Fixes https://its.cern.ch/jira/browse/ROOT-10743
Related:
https://its.cern.ch/jira/browse/ROOT-9385
Checklist: