Add include guards to all boost includes, as qt's moc trips over nested BOOST_JOIN macros: * usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN" * usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN" * eiskaltdcpp-qt/CMakeFiles/eiskaltdcpp-qt.dir/build.make:77: recipe for target 'eiskaltdcpp-qt/src/moc_UCModel.cxx' failed https://bugs.gentoo.org/show_bug.cgi?id=556600 --- eiskaltdcpp-2.2.9/dcpp/AdcHub.cpp +++ eiskaltdcpp-2.2.9/dcpp/AdcHub.cpp @@ -20,7 +20,9 @@ #include "AdcHub.h" +#ifndef Q_MOC_RUN #include +#endif #include "ChatMessage.h" #include "ClientManager.h" --- eiskaltdcpp-2.2.9/dcpp/Atomic.h +++ eiskaltdcpp-2.2.9/dcpp/Atomic.h @@ -19,9 +19,11 @@ #pragma once #include "CriticalSection.h" +#ifndef Q_MOC_RUN #include #include #include +#endif namespace dcpp { --- eiskaltdcpp-2.2.9/dcpp/CriticalSection.h +++ eiskaltdcpp-2.2.9/dcpp/CriticalSection.h @@ -24,7 +24,9 @@ #ifndef DO_NOT_USE_MUTEX #if defined (_WIN32) +#ifndef Q_MOC_RUN #include +#endif #ifdef FIX_FOR_OLD_BOOST template @@ -48,7 +50,9 @@ } }; #else // FIX_FOR_OLD_BOOST +#ifndef Q_MOC_RUN #include +#endif #endif // FIX_FOR_OLD_BOOST #else @@ -73,7 +77,9 @@ #else // DO_NOT_USE_MUTEX +#ifndef Q_MOC_RUN #include +#endif namespace dcpp { --- eiskaltdcpp-2.2.9/dcpp/CryptoManager.cpp +++ eiskaltdcpp-2.2.9/dcpp/CryptoManager.cpp @@ -19,7 +19,9 @@ #include "stdinc.h" #include "CryptoManager.h" +#ifndef Q_MOC_RUN #include +#endif #include "File.h" #include "LogManager.h" --- eiskaltdcpp-2.2.9/dcpp/FilteredFile.h +++ eiskaltdcpp-2.2.9/dcpp/FilteredFile.h @@ -18,7 +18,9 @@ #pragma once +#ifndef Q_MOC_RUN #include +#endif #include "Streams.h" #include "Exception.h" --- eiskaltdcpp-2.2.9/dcpp/FinishedItem.h +++ eiskaltdcpp-2.2.9/dcpp/FinishedItem.h @@ -18,7 +18,9 @@ #pragma once +#ifndef Q_MOC_RUN #include +#endif #include "forward.h" #include "Pointer.h" #include "Util.h" --- eiskaltdcpp-2.2.9/dcpp/format.h +++ eiskaltdcpp-2.2.9/dcpp/format.h @@ -19,7 +19,9 @@ #pragma once #include +#ifndef Q_MOC_RUN #include +#endif #ifdef BUILDING_DCPP --- eiskaltdcpp-2.2.9/dcpp/forward.h +++ eiskaltdcpp-2.2.9/dcpp/forward.h @@ -22,7 +22,9 @@ * This file contains forward declarations for the various DC++ classes */ +#ifndef Q_MOC_RUN #include +#endif namespace dcpp { --- eiskaltdcpp-2.2.9/dcpp/Pointer.h +++ eiskaltdcpp-2.2.9/dcpp/Pointer.h @@ -18,8 +18,10 @@ #pragma once +#ifndef Q_MOC_RUN #include #include +#endif #include "noexcept.h" namespace dcpp { --- eiskaltdcpp-2.2.9/dcpp/stdinc.h +++ eiskaltdcpp-2.2.9/dcpp/stdinc.h @@ -91,9 +91,11 @@ #include #include +#ifndef Q_MOC_RUN #include #include #include +#endif #include --- eiskaltdcpp-2.2.9/dcpp/Thread.h +++ eiskaltdcpp-2.2.9/dcpp/Thread.h @@ -26,7 +26,9 @@ #include #endif +#ifndef Q_MOC_RUN #include +#endif #include "Exception.h" namespace dcpp { --- eiskaltdcpp-2.2.9/dcpp/TigerHash.cpp +++ eiskaltdcpp-2.2.9/dcpp/TigerHash.cpp @@ -32,7 +32,9 @@ #include #include +#ifndef Q_MOC_RUN #include +#endif #include "debug.h" --- eiskaltdcpp-2.2.9/dcpp/TimerManager.cpp +++ eiskaltdcpp-2.2.9/dcpp/TimerManager.cpp @@ -21,8 +21,10 @@ #include "TimerManager.h" #ifndef TIMER_OLD_BOOST +#ifndef Q_MOC_RUN #include #endif +#endif namespace dcpp { #ifdef TIMER_OLD_BOOST --- eiskaltdcpp-2.2.9/dcpp/TimerManager.h +++ eiskaltdcpp-2.2.9/dcpp/TimerManager.h @@ -25,8 +25,10 @@ #ifdef TIMER_OLD_BOOST #include "Semaphore.h" #else +#ifndef Q_MOC_RUN #include #endif +#endif #ifndef _WIN32 #include --- eiskaltdcpp-2.2.9/dcpp/UPnPManager.h +++ eiskaltdcpp-2.2.9/dcpp/UPnPManager.h @@ -23,7 +23,9 @@ #include "Thread.h" #include "UPnP.h" #include "Atomic.h" +#ifndef Q_MOC_RUN #include +#endif namespace dcpp { --- eiskaltdcpp-2.2.9/dcpp/User.h +++ eiskaltdcpp-2.2.9/dcpp/User.h @@ -25,7 +25,9 @@ #include "CriticalSection.h" #include "Flags.h" #include "forward.h" +#ifndef Q_MOC_RUN #include +#endif #include #include --- eiskaltdcpp-2.2.9/eiskaltdcpp-daemon/utility.cpp +++ eiskaltdcpp-2.2.9/eiskaltdcpp-daemon/utility.cpp @@ -19,10 +19,14 @@ #include #endif #if (defined(__GNUC__) && !defined(__clang__)) && (__GNUC__ == 4 && __GNUC_MINOR__ < 7) +#ifndef Q_MOC_RUN #include +#endif #define USE_BOOST_LEXICAL_CAST 1 #elif defined(__clang__) && (__clang_major__ == 3 && __clang_minor__ < 2) +#ifndef Q_MOC_RUN #include +#endif #define USE_BOOST_LEXICAL_CAST 1 #endif //--------------------------------------------------------------------------- --- eiskaltdcpp-2.2.9/eiskaltdcpp-qt/src/PoolItem.h +++ eiskaltdcpp-2.2.9/eiskaltdcpp-qt/src/PoolItem.h @@ -9,7 +9,9 @@ #pragma once +#ifndef Q_MOC_RUN #include +#endif #include template --- eiskaltdcpp-2.2.9/eiskaltdcpp-qt/src/SearchBlacklist.h +++ eiskaltdcpp-2.2.9/eiskaltdcpp-qt/src/SearchBlacklist.h @@ -14,7 +14,9 @@ #include #include +#ifndef Q_MOC_RUN #include +#endif #include "dcpp/stdinc.h" #include "dcpp/Singleton.h" --- eiskaltdcpp-2.2.9/eiskaltdcpp-qt/src/SpyModel.h +++ eiskaltdcpp-2.2.9/eiskaltdcpp-qt/src/SpyModel.h @@ -13,7 +13,9 @@ #include #include +#ifndef Q_MOC_RUN #include +#endif #define COLUMN_SPY_COUNT 0 #define COLUMN_SPY_STRING 1 --- eiskaltdcpp-2.2.9/json/jsoncpp/jsoncpp.cpp +++ eiskaltdcpp-2.2.9/json/jsoncpp/jsoncpp.cpp @@ -77,10 +77,14 @@ #if (defined(__GNUC__) && !defined(__clang__)) && (__GNUC__ == 4 && __GNUC_MINOR__ < 7) +#ifndef Q_MOC_RUN #include +#endif #define USE_BOOST_LEXICAL_CAST 1 #elif defined(__clang__) && (__clang_major__ == 3 && __clang_minor__ < 2) +#ifndef Q_MOC_RUN #include +#endif #define USE_BOOST_LEXICAL_CAST 1 #endif