<table><tr><td style="">mwolff created this revision.<br />mwolff added reviewers: KDevelop, rjvbb.<br />Restricted Application added a subscriber: kdevelop-devel.<br />mwolff requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D11921">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>When the build dir is accessible via multiple (symlinked) paths,<br />
we should reuse whatever the current CMakeCache is using. This<br />
ensures that we don't trigger a needless cache invalidation leading<br />
to a full project rebuild. E.g. I have:</p>

<p>/home/milian/projects/kf5/src/frameworks/kdesu</p>

<p>kdesrc-build will build this in:<br />
/home/milian/projects/kf5/build-dbg/frameworks/kdesu</p>

<p>To enable quick build dir selection by kdevelop, I also<br />
created this symlink:<br />
/home/milian/projects/kf5/build -> /home/milian/projects/kf5/build-dbg</p>

<p>Thus KDevelop is running the cmake server configuration job with<br />
this path instead of the one chosen by kdesrc-build above:<br />
/home/milian/projects/kf5/build/frameworks/kdesu</p>

<p>In the end, this lead to me having to recompile every project after<br />
I ran kdesrc-build and opening the project in kdevelop...</p>

<p>This patch looks up the existing CMAKE_CACHEFILE_DIR variable<br />
and reuses that if available. I.e. now KDevelop will actually use<br />
/home/milian/projects/kf5/build-dbg/frameworks/kdesu automatically,<br />
and I don't need to recompile everything all the time.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D11921">https://phabricator.kde.org/D11921</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>plugins/cmake/cmakeserver.cpp<br />
plugins/quickopen/tests/test_quickopen.cpp</div></div></div><br /><div><strong>To: </strong>mwolff, KDevelop, rjvbb<br /><strong>Cc: </strong>kdevelop-devel<br /></div>