add back c++11 support to all, fix includes in networking

This commit is contained in:
Stephen Birarda 2014-11-18 17:26:42 -08:00
parent 9094fef8b8
commit 998457665f
4 changed files with 26 additions and 6 deletions

View file

@ -34,13 +34,33 @@ elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fno-strict-aliasing")
endif(WIN32)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if (COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
if (APPLE)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++0x")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
endif ()
if (NOT HIFI_ANDROID)
set(HIFI_ANDROID $ENV{HIFI_ANDROID})
endif ()
if (ANDROID)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
if (ANDROID)
if (NOT ANDROID_QT_CMAKE_PREFIX_PATH)
set(QT_CMAKE_PREFIX_PATH ${HIFI_ANDROID}/qt/5.3/android_armv7/lib/cmake)
endif ()

View file

@ -20,7 +20,7 @@ GVRInterface::GVRInterface(int argc, char* argv[]) :
connect(&nodeList->getNodeSocket(), &QUdpSocket::readyRead, this, &GVRInterface::processDatagrams);
nodeList->getDomainHandler().setHostname(DEFAULT_DOMAIN_HOSTNAME);
nodeList->getDomainHandler().setHostname("10.0.0.190");
QTimer* domainServerTimer = new QTimer(this);
connect(domainServerTimer, &QTimer::timeout, nodeList, &NodeList::sendDomainServerCheckIn);

View file

@ -13,8 +13,8 @@
#define hifi_DataServerAccountInfo_h
#include <QtCore/QObject>
#include <qnetworkreply.h>
#include <QtCore/QUuid>
#include <QtNetwork/qnetworkreply.h>
#include "OAuthAccessToken.h"

View file

@ -12,7 +12,7 @@
#ifndef hifi_NetworkAccessManager_h
#define hifi_NetworkAccessManager_h
#include <QNetworkAccessManager>
#include <QtNetwork/qnetworkaccessmanager.h>
/// Wrapper around QNetworkAccessManager to restrict at one instance by thread
class NetworkAccessManager : public QObject {