<table><tr><td style="">nalvarez created this revision.<br />nalvarez set the repository for this revision to rAKONADI Akonadi .<br />nalvarez added a project: KDE PIM.<br />Restricted Application added a subscriber: kde-pim.</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/D2431" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The <tt style="background: #ebebeb; font-size: 13px;">add_akonadi_isolated_test</tt> CMake macro was searching for <tt style="background: #ebebeb; font-size: 13px;">akonaditest</tt> using <tt style="background: #ebebeb; font-size: 13px;">find_program</tt>. This is the right thing to do when the macro is called by a separate project that uses akonadi, since then it is already in the system as a required dependency.</p>

<p>However, this will not work when building akonadi itself for the first time, where akonadi is not installed in the system yet. <tt style="background: #ebebeb; font-size: 13px;">akonaditest</tt> will not be found, since it will be built and installed by <em>this same project</em>, and that's at <tt style="background: #ebebeb; font-size: 13px;">make</tt> time, long after this macro runs.</p>

<p>This patch checks if we're building akonadi itself, and if so, it sets the test runner as just <tt style="background: #ebebeb; font-size: 13px;">"akonaditest"</tt>. When using the <tt style="background: #ebebeb; font-size: 13px;">add_test(NAME foo COMMAND akonaditest)</tt> syntax, CMake will detect that it's a target name and replace it with the location of the executable that <em>will</em> be built.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>I only tried building and testing Akonadi itself, in a very clean environment. It's still necessary to test if I didn't break building (and running tests in) other projects that depend on Akonadi, and if the warning is printed properly if <tt style="background: #ebebeb; font-size: 13px;">akonaditest</tt> is missing.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>rAKONADI Akonadi </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/D2431" rel="noreferrer">https://phabricator.kde.org/D2431</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>KF5AkonadiMacros.cmake</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>nalvarez<br /><strong>Cc: </strong>kde-pim, spencerb, dvasin, winterz, smartins, vkrause, mlaurent, knauss, dvratil<br /></div>