Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
Precompile headers
Browse files Browse the repository at this point in the history
  • Loading branch information
mhoran committed Mar 12, 2013
1 parent 86af203 commit 366b6b9
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -19,3 +19,4 @@ tmp
src/debug
webkit_server.pro.user
.vagrant
*.gch
39 changes: 39 additions & 0 deletions src/stable.h
@@ -0,0 +1,39 @@
#include <QApplication>
#include <QByteArray>
#include <QDebug>
#include <QEvent>
#include <QFile>
#include <QIODevice>
#include <QList>
#include <QNetworkCookie>
#include <QNetworkProxy>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QObject>
#include <QResource>
#include <QSet>
#include <QString>
#include <QStringList>
#include <QTcpServer>
#include <QTcpSocket>
#include <QTimer>
#include <QUuid>
#include <QVariant>
#include <QVariantList>
#include <QWebElement>
#include <QWebSettings>
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkCookie>
#include <QtNetwork/QNetworkCookieJar>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkRequest>
#include <QtNetwork>
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
#include <QtWebKitWidgets>
#else
#include <QtWebKit>
#endif
#include <cmath>
#include <fstream>
#include <iostream>
#include <sstream>
5 changes: 3 additions & 2 deletions src/webkit_server.pro
Expand Up @@ -127,12 +127,13 @@ SOURCES = \
FindXpath.cpp

RESOURCES = webkit_server.qrc
QT += network webkitwidgets
QT += network
greaterThan(QT_MAJOR_VERSION, 4) {
QT += webkitwidgets
} else {
QT += webkit
}
CONFIG += console
CONFIG += console precompile_header
CONFIG -= app_bundle
PRECOMPILED_HEADER = stable.h

3 comments on commit 366b6b9

@clintmiller
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this commit breaks the build of the 1.0.0 release's native extensions. Qt 4.8.4 with QMake 2.01a; OS X 10.8 (so it builds with clang):

/usr/bin/clang++ -c -include webkit_server -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.8 -Wall -W -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/local/share/qt4/mkspecs/macx-g++ -I. -I. -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtNetwork.frame
work/Versions/4/Headers -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtNetwork.framework/Versions/4/Hea
ders -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/include -F/opt/local/Library/Frameworks -F/opt/local/lib -o Version.o Version.cpp
error: unable to read PCH file webkit_server.gch: 'Is a directory'
make[1]: *** [Version.o] Error 1
make: *** [sub-src-webkit_server-pro-make_default-ordered] Error 2
Command 'make' failed

I suspect it has something to do with a changed (or incompatible?) precompiled header format. 0.14.2 builds its native extensions correctly. any ideas?

@mhoran
Copy link
Collaborator Author

@mhoran mhoran commented on 366b6b9 Jun 4, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that you have the XCode command line tools installed. I've seen this error on boxes without command line tools installed.

@clintmiller
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick response. I have the XCode command line tools installed.

Please sign in to comment.