<table><tr><td style="">rakuco created this revision.<br />rakuco added a reviewer: Kopete.<br />Herald added a project: Kopete.<br />Herald added a subscriber: kopete-devel.<br />rakuco 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/D24609">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The build system was currently both relying on CMake's AUTOMOC handling and<br />
manually calling <tt style="background: #ebebeb; font-size: 13px;">qt_wrap_cpp()</tt> for a few headers.</p>

<p>The former was causing the moc-generated code to go to<br />
<tt style="background: #ebebeb; font-size: 13px;">mocs_compilation.cpp</tt>, and the latter also caused the moc-generated<br />
<tt style="background: #ebebeb; font-size: 13px;">moc_*.cxx</tt> to be built. This resulted in the meta object code being built<br />
twice, which is wrong, in the worst cause, cause linking problems.</p>

<p>Older LLD versions were affected per<br />
<a href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228640" class="remarkup-link" target="_blank" rel="noreferrer">https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228640</a></p>

<p>Drop <tt style="background: #ebebeb; font-size: 13px;">qt_wrap_cpp()</tt> and include the missing moc files from the source code<br />
and let CMake's automoc code handle everything transparently.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Everything built fine, and CMake stopped emitting the following warning:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files.
Run "cmake --help-policy CMP0071" for policy details.  Use the cmake_policy
command to set the policy and suppress this warning.

For compatibility, CMake is excluding the GENERATED source file(s):

  "/wrkdirs/usr/ports/net-im/kopete/work/.build/protocols/jabber/libiris/moc_xmpp_client.cxx"
  "/wrkdirs/usr/ports/net-im/kopete/work/.build/protocols/jabber/libiris/moc_xmpp.cxx"
  "/wrkdirs/usr/ports/net-im/kopete/work/.build/protocols/jabber/libiris/moc_xmpp_clientstream.cxx"
  "/wrkdirs/usr/ports/net-im/kopete/work/.build/protocols/jabber/libiris/moc_xmpp_stream.cxx"
  "/wrkdirs/usr/ports/net-im/kopete/work/.build/protocols/jabber/libiris/moc_td.cxx"
  "/wrkdirs/usr/ports/net-im/kopete/work/.build/protocols/jabber/libiris/moc_qjdnsshared_p.cxx"
  "/wrkdirs/usr/ports/net-im/kopete/work/.build/protocols/jabber/libiris/moc_qjdns.cxx"
  "/wrkdirs/usr/ports/net-im/kopete/work/.build/protocols/jabber/libiris/moc_qjdnsshared.cxx"

from processing by AUTOMOC.  If any of the files should be processed, set
CMP0071 to NEW.  If any of the files should not be processed, explicitly
exclude them by setting the source file property SKIP_AUTOMOC:

  set_property(SOURCE file.h PROPERTY SKIP_AUTOMOC ON)</pre></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R434 Kopete</div></div></div><br /><div><strong>BRANCH</strong><div><div>libiris-automoc</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D24609">https://phabricator.kde.org/D24609</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>protocols/jabber/libiris/CMakeLists.txt<br />
protocols/jabber/libiris/src/jdns/src/qjdns/qjdns.cpp<br />
protocols/jabber/libiris/src/jdns/src/qjdns/qjdnsshared.cpp<br />
protocols/jabber/libiris/src/xmpp/xmpp-core/connector.cpp<br />
protocols/jabber/libiris/src/xmpp/xmpp-core/stream.cpp<br />
protocols/jabber/libiris/src/xmpp/xmpp-im/client.cpp</div></div></div><br /><div><strong>To: </strong>rakuco, Kopete<br /><strong>Cc: </strong>kopete-devel, himanshuvishwakarma, cochise<br /></div>