mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
refs #213 Added precompiled header for MSVC in blackmisc, blackcore, blackgui.
This commit is contained in:
@@ -6,7 +6,7 @@ QT += network dbus xml multimedia
|
||||
|
||||
TARGET = blackcore
|
||||
TEMPLATE = lib
|
||||
CONFIG += blackconfig blackmisc blackinput blacksound
|
||||
CONFIG += blackconfig blackmisc blackinput blacksound precompile_header
|
||||
|
||||
contains(BLACK_CONFIG, Static) {
|
||||
CONFIG += staticlib
|
||||
@@ -15,10 +15,7 @@ contains(BLACK_CONFIG, Static) {
|
||||
INCLUDEPATH += ..
|
||||
DEPENDPATH += . ..
|
||||
|
||||
# PRECOMPILED_HEADER = stdpch.h
|
||||
precompile_header:!isEmpty(PRECOMPILED_HEADER) {
|
||||
DEFINES += USING_PCH
|
||||
}
|
||||
PRECOMPILED_HEADER = pch/pch.h
|
||||
|
||||
DEFINES += LOG_IN_FILE BUILD_BLACKCORE_LIB
|
||||
|
||||
|
||||
46
src/blackcore/pch/pch.h
Normal file
46
src/blackcore/pch/pch.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/* Copyright (C) 2017
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
/* ---------
|
||||
* ! WARNING !
|
||||
* ---------------------------------------------------------------------------------
|
||||
* >>>> CHANGES IN ANY HEADERS INCLUDED HEREIN WILL TRIGGER A FULL REBUILD OF EVERYTHING! <<<<
|
||||
* ---------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifdef BLACKCORE_PCH_H
|
||||
#error "Don't #include this file"
|
||||
#else
|
||||
#define BLACKCORE_PCH_H
|
||||
|
||||
#include "blackmisc/pch/pch.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <QDBusAbstractInterface>
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusConnectionInterface>
|
||||
#include <QDBusError>
|
||||
#include <QDBusMessage>
|
||||
#include <QDBusPendingCall>
|
||||
#include <QDBusPendingReply>
|
||||
#include <QDBusReply>
|
||||
#include <QDBusServer>
|
||||
#include <QDBusServiceWatcher>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkCookieJar>
|
||||
#include <QNetworkInterface>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QUrl>
|
||||
|
||||
#endif // __cplusplus
|
||||
#endif // guard
|
||||
@@ -4,7 +4,7 @@ QT += network dbus gui svg widgets
|
||||
|
||||
TARGET = blackgui
|
||||
TEMPLATE = lib
|
||||
CONFIG += blackconfig blackmisc blackcore
|
||||
CONFIG += blackconfig blackmisc blackcore precompile_header
|
||||
|
||||
contains(BLACK_CONFIG, Static) {
|
||||
CONFIG += staticlib
|
||||
@@ -13,10 +13,7 @@ contains(BLACK_CONFIG, Static) {
|
||||
INCLUDEPATH += ..
|
||||
DEPENDPATH += . ..
|
||||
|
||||
# PRECOMPILED_HEADER = stdpch.h
|
||||
precompile_header:!isEmpty(PRECOMPILED_HEADER) {
|
||||
DEFINES += USING_PCH
|
||||
}
|
||||
PRECOMPILED_HEADER = pch/pch.h
|
||||
|
||||
DEFINES += LOG_IN_FILE BUILD_BLACKGUI_LIB
|
||||
|
||||
|
||||
70
src/blackgui/pch/pch.h
Normal file
70
src/blackgui/pch/pch.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/* Copyright (C) 2017
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
/* ---------
|
||||
* ! WARNING !
|
||||
* ---------------------------------------------------------------------------------
|
||||
* >>>> CHANGES IN ANY HEADERS INCLUDED HEREIN WILL TRIGGER A FULL REBUILD OF EVERYTHING! <<<<
|
||||
* ---------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifdef BLACKGUI_PCH_H
|
||||
#error "Don't #include this file"
|
||||
#else
|
||||
#define BLACKGUI_PCH_H
|
||||
|
||||
#include "blackcore/pch/pch.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "blackcore/context/contextallinterfaces.h"
|
||||
|
||||
#include <QAbstractButton>
|
||||
#include <QAbstractItemModel>
|
||||
#include <QAbstractItemView>
|
||||
#include <QAbstractScrollArea>
|
||||
#include <QAbstractTableModel>
|
||||
#include <QComboBox>
|
||||
#include <QDialog>
|
||||
#include <QDockWidget>
|
||||
#include <QDrag>
|
||||
#include <QDragEnterEvent>
|
||||
#include <QDragLeaveEvent>
|
||||
#include <QDragMoveEvent>
|
||||
#include <QDropEvent>
|
||||
#include <QFrame>
|
||||
#include <QImage>
|
||||
#include <QLabel>
|
||||
#include <QLayout>
|
||||
#include <QLayoutItem>
|
||||
#include <QLineEdit>
|
||||
#include <QMenu>
|
||||
#include <QMenuBar>
|
||||
#include <QMessageBox>
|
||||
#include <QPoint>
|
||||
#include <QPushButton>
|
||||
#include <QRadioButton>
|
||||
#include <QRect>
|
||||
#include <QSize>
|
||||
#include <QSlider>
|
||||
#include <QSplitter>
|
||||
#include <QStackedWidget>
|
||||
#include <QStyle>
|
||||
#include <QTabBar>
|
||||
#include <QTabWidget>
|
||||
#include <QTableView>
|
||||
#include <QTextEdit>
|
||||
#include <QValidator>
|
||||
#include <QWidget>
|
||||
#include <QWindow>
|
||||
|
||||
#endif // __cplusplus
|
||||
#endif // guard
|
||||
@@ -4,7 +4,7 @@ QT += network dbus xml
|
||||
|
||||
TARGET = blackmisc
|
||||
TEMPLATE = lib
|
||||
CONFIG += blackconfig
|
||||
CONFIG += blackconfig precompile_header
|
||||
|
||||
contains(BLACK_CONFIG, Static) {
|
||||
CONFIG += staticlib
|
||||
@@ -12,10 +12,8 @@ contains(BLACK_CONFIG, Static) {
|
||||
|
||||
INCLUDEPATH += ..
|
||||
# DEPENDPATH += . .. // BlackMisc should be independent
|
||||
# PRECOMPILED_HEADER = stdpch.h
|
||||
precompile_header:!isEmpty(PRECOMPILED_HEADER) {
|
||||
DEFINES += USING_PCH
|
||||
}
|
||||
|
||||
PRECOMPILED_HEADER = pch/pch.h
|
||||
|
||||
DEFINES += LOG_IN_FILE BUILD_BLACKMISC_LIB
|
||||
RESOURCES += blackmisc.qrc
|
||||
|
||||
@@ -78,10 +78,22 @@ namespace BlackMisc
|
||||
* \ingroup MetaClass
|
||||
*/
|
||||
template <quint64 F>
|
||||
struct MetaFlags : public std::integral_constant<quint64, F>
|
||||
struct MetaFlags /* : public std::integral_constant<quint64, F> */
|
||||
{
|
||||
//! Implicit conversion to std::false_type (if F is zero) or std::true_type (if F is non-zero).
|
||||
constexpr operator std::integral_constant<bool, static_cast<bool>(F)>() const { return {}; }
|
||||
|
||||
#if defined(Q_CC_MSVC) && ! defined(Q_CC_CLANG) // gymnastics to workaround an MSVC 2017 precompiled header ICE
|
||||
int m_dummy = 0;
|
||||
#if _MSC_FULL_VER < 191000000
|
||||
constexpr MetaFlags() {}
|
||||
#endif
|
||||
#endif
|
||||
constexpr operator quint64() const { return F; } //!< Implicit conversion to integer.
|
||||
constexpr quint64 operator ()() const { return F; } //!< Call operator.
|
||||
constexpr static quint64 value = F; //!< Value.
|
||||
using value_type = quint64; //!< Value type.
|
||||
using type = MetaFlags; //!< Own type.
|
||||
};
|
||||
|
||||
/*!
|
||||
|
||||
128
src/blackmisc/pch/pch.h
Normal file
128
src/blackmisc/pch/pch.h
Normal file
@@ -0,0 +1,128 @@
|
||||
/* Copyright (C) 2017
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
/* ---------
|
||||
* ! WARNING !
|
||||
* ---------------------------------------------------------------------------------
|
||||
* >>>> CHANGES IN ANY HEADERS INCLUDED HEREIN WILL TRIGGER A FULL REBUILD OF EVERYTHING! <<<<
|
||||
* ---------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifdef BLACKMISC_PCH_H
|
||||
#error "Don't #include this file"
|
||||
#else
|
||||
#define BLACKMISC_PCH_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#if defined(_MSC_FULL_VER) && _MSC_FULL_VER < 191000000
|
||||
#pragma warning(disable:4503)
|
||||
#endif
|
||||
|
||||
#include "blackmisc/collection.h"
|
||||
#include "blackmisc/compare.h"
|
||||
#include "blackmisc/containerbase.h"
|
||||
#include "blackmisc/dbus.h"
|
||||
#include "blackmisc/dictionary.h"
|
||||
#include "blackmisc/iterator.h"
|
||||
#include "blackmisc/json.h"
|
||||
#include "blackmisc/metaclass.h"
|
||||
#include "blackmisc/range.h"
|
||||
#include "blackmisc/sequence.h"
|
||||
#include "blackmisc/valueobject.h"
|
||||
#include "blackmisc/verify.h"
|
||||
#include "blackmisc/worker.h"
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QChar>
|
||||
#include <QCoreApplication>
|
||||
#include <QDBusArgument>
|
||||
#include <QDBusMetaType>
|
||||
#include <QDate>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QFlag>
|
||||
#include <QFlags>
|
||||
#include <QFutureWatcher>
|
||||
#include <QGlobalStatic>
|
||||
#include <QHash>
|
||||
#include <QIODevice>
|
||||
#include <QIcon>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonValueRef>
|
||||
#include <QLatin1Char>
|
||||
#include <QLatin1Literal>
|
||||
#include <QLatin1String>
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMap>
|
||||
#include <QMessageLogContext>
|
||||
#include <QMetaMethod>
|
||||
#include <QMetaObject>
|
||||
#include <QMetaType>
|
||||
#include <QMutex>
|
||||
#include <QMutexLocker>
|
||||
#include <QObject>
|
||||
#include <QPair>
|
||||
#include <QPixmap>
|
||||
#include <QReadLocker>
|
||||
#include <QReadWriteLock>
|
||||
#include <QScopedPointer>
|
||||
#include <QSet>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QStringBuilder>
|
||||
#include <QStringList>
|
||||
#include <QStringRef>
|
||||
#include <QThread>
|
||||
#include <QTime>
|
||||
#include <QTimer>
|
||||
#include <QVariant>
|
||||
#include <QVariantList>
|
||||
#include <QVector>
|
||||
#include <QWeakPointer>
|
||||
#include <QWriteLocker>
|
||||
#include <QtGlobal>
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <future>
|
||||
#include <initializer_list>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <numeric>
|
||||
#include <random>
|
||||
#include <set>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <typeindex>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#endif // __cplusplus
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user