Commit 5a36ec88 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa
Browse files

libiris: Stop using qt_wrap_cpp()

The build system was currently both relying on CMake's AUTOMOC handling and
manually calling `qt_wrap_cpp()` for a few headers.

The former was causing the moc-generated code to go to
`mocs_compilation.cpp`, and the latter also caused the moc-generated
`moc_*.cxx` to be built. This resulted in the meta object code being built
twice, which is wrong, in the worst cause, cause linking problems.

Older LLD versions were affected per

Drop `qt_wrap_cpp()` and include the missing moc files from the source code
and let CMake's automoc code handle everything transparently.

Test Plan:
Everything built fine, and CMake stopped emitting the following warning:

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):


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)

Reviewers: #kopete, #build_system, apol

Reviewed By: apol

Subscribers: kopete-devel

Tags: #kopete

Differential Revision:
parent 22563ca5
...@@ -30,17 +30,6 @@ include_directories( ...@@ -30,17 +30,6 @@ include_directories(
) )
qt_wrap_cpp(iris_kopete iris_MOC_SRCS
set(iris_SRCS set(iris_SRCS
src/xmpp/base/randomnumbergenerator.cpp src/xmpp/base/randomnumbergenerator.cpp
src/xmpp/base/timezone.cpp src/xmpp/base/timezone.cpp
...@@ -131,7 +120,6 @@ endif(WIN32) ...@@ -131,7 +120,6 @@ endif(WIN32)
set(libiris_SRCS set(libiris_SRCS
${cutestuff_SRCS} ${cutestuff_SRCS}
${iris_SRCS} ${iris_SRCS}
) )
add_definitions(-DIRISNET_STATIC) add_definitions(-DIRISNET_STATIC)
...@@ -1014,3 +1014,5 @@ void QJDns::publishCancel(int id) ...@@ -1014,3 +1014,5 @@ void QJDns::publishCancel(int id)
d->removeCancelled(id); d->removeCancelled(id);
d->process(); d->process();
} }
#include "moc_qjdns.cpp"
...@@ -1206,3 +1206,6 @@ void QJDnsSharedPrivate::jdns_debugLinesReady() ...@@ -1206,3 +1206,6 @@ void QJDnsSharedPrivate::jdns_debugLinesReady()
doDebug(jdns, instanceForQJDns.value(jdns)->index); doDebug(jdns, instanceForQJDns.value(jdns)->index);
} }
#include "moc_qjdnsshared.cpp"
#include "moc_qjdnsshared_p.cpp"
...@@ -574,3 +574,5 @@ QString AdvancedConnector::host() const ...@@ -574,3 +574,5 @@ QString AdvancedConnector::host() const
{ {
return d->host; return d->host;
} }
#include "moc_xmpp.cpp"
...@@ -1546,3 +1546,6 @@ void TD::incomingXml(const QDomElement &e) ...@@ -1546,3 +1546,6 @@ void TD::incomingXml(const QDomElement &e)
debug_ptr->incomingXml(e); debug_ptr->incomingXml(e);
} }
#endif #endif
#include "moc_xmpp_clientstream.cpp"
#include "moc_xmpp_stream.cpp"
...@@ -1360,3 +1360,5 @@ LiveRoster::ConstIterator LiveRoster::find(const Jid &j, bool compareRes) const ...@@ -1360,3 +1360,5 @@ LiveRoster::ConstIterator LiveRoster::find(const Jid &j, bool compareRes) const
} }
} }
#include "moc_xmpp_client.cpp"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment