D11921: CMake Server: Reuse existing build directory path when available
Milian Wolff
noreply at phabricator.kde.org
Wed Apr 4 11:06:57 UTC 2018
mwolff created this revision.
mwolff added reviewers: KDevelop, rjvbb.
Restricted Application added a subscriber: kdevelop-devel.
mwolff requested review of this revision.
REVISION SUMMARY
When the build dir is accessible via multiple (symlinked) paths,
we should reuse whatever the current CMakeCache is using. This
ensures that we don't trigger a needless cache invalidation leading
to a full project rebuild. E.g. I have:
/home/milian/projects/kf5/src/frameworks/kdesu
kdesrc-build will build this in:
/home/milian/projects/kf5/build-dbg/frameworks/kdesu
To enable quick build dir selection by kdevelop, I also
created this symlink:
/home/milian/projects/kf5/build -> /home/milian/projects/kf5/build-dbg
Thus KDevelop is running the cmake server configuration job with
this path instead of the one chosen by kdesrc-build above:
/home/milian/projects/kf5/build/frameworks/kdesu
In the end, this lead to me having to recompile every project after
I ran kdesrc-build and opening the project in kdevelop...
This patch looks up the existing CMAKE_CACHEFILE_DIR variable
and reuses that if available. I.e. now KDevelop will actually use
/home/milian/projects/kf5/build-dbg/frameworks/kdesu automatically,
and I don't need to recompile everything all the time.
REPOSITORY
R32 KDevelop
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D11921
AFFECTED FILES
plugins/cmake/cmakeserver.cpp
plugins/quickopen/tests/test_quickopen.cpp
To: mwolff, #kdevelop, rjvbb
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180404/1004bae8/attachment.html>
More information about the KDevelop-devel
mailing list