Summary: | KDEInstallDirs: unset calls break mixed GNUInstallDirs+KDEInstallDirs projects (e.g. Calamares) | ||
---|---|---|---|
Product: | [Frameworks and Libraries] extra-cmake-modules | Reporter: | Kevin Kofler <kevin.kofler> |
Component: | general | Assignee: | Alex Merry <alex.merry> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | demm, ecm-bugs-null, rdieter |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/extra-cmake-modules/4462e9ddedb78c31a6f1089d073b1bfde6ce60ce | Version Fixed In: | 1.6.1 |
Sentry Crash Report: |
Description
Kevin Kofler
2015-01-11 03:40:53 UTC
Proposed fix: https://git.reviewboard.kde.org/r/121978/ I hadn't considered that use case. You're right - we shouldn't be messing with the cache variables. As noted on your RR, a slightly more involved fix is needed: https://git.reviewboard.kde.org/r/121982/ Makes sense, I had only considered the distro package use case, where we run cmake once with a cache that's always empty and where the only effect of CACHE is that the variable can be set on the command line. I'm testing your version of the patch now. Git commit 4462e9ddedb78c31a6f1089d073b1bfde6ce60ce by Alex Merry. Committed on 11/01/2015 at 10:57. Pushed by alexmerry into branch 'master'. Do not unset cache variables in KDEInstallDirs. Cache variables such as CMAKE_INSTALL_BINDIR may be used by other modules included from parallel parts of the tree, so we should not touch them. We still override them in the runtime environment, but this will not interfere with parallel subtrees of the project. As part of this, the order of precedence of variables specified on the command line is changed, so that KDE_INSTALL_* is considered first (although it is still considered "undefined" in the documentation). This means that if you only specify CMAKE_INSTALL_BINDIR, that will be used by both KDEInstallDirs and GNUInstallDirs, but if you specify both that and KDE_INSTALL_BINDIR, KDEInstallDirs will use KDE_INSTALL_BINDIR instead. This is probably not too useful, but seems more useful than any other arrangement. REVIEW: 121982 M +20 -18 kde-modules/KDEInstallDirs.cmake http://commits.kde.org/extra-cmake-modules/4462e9ddedb78c31a6f1089d073b1bfde6ce60ce |