[CORE] Allowing compilation with c++11

This commit is contained in:
Yehonal
2016-08-10 12:39:25 +02:00
parent 6f7a046575
commit fc8599299e
6 changed files with 19 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ include(CheckPlatform)
# basic packagesearching and setup (further support will be needed, this is a preliminary release!)
set(OPENSSL_EXPECTED_VERSION 1.0.0)
set(ACE_EXPECTED_VERSION 5.8.3)
set(ACE_EXPECTED_VERSION 6.0.3)
find_package(PCHSupport)
find_package(ACE REQUIRED)

View File

@@ -13,3 +13,5 @@ if(WITH_COREDEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
message(STATUS "Clang: Debug-flags set (-g3)")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-narrowing -Wno-deprecated-register")

View File

@@ -1,6 +1,18 @@
# Set build-directive (used in core to tell which buildtype we used)
add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"')
set(GCC_EXPECTED_VERSION 4.8.2)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION)
message(FATAL_ERROR "GCC: AzerothCore requires version ${GCC_EXPECTED_VERSION} to build but found ${CMAKE_CXX_COMPILER_VERSION}")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
message(STATUS "GCC: Enabled c++11 support")
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
#message(STATUS "GCC: Enabled C99 support")
if(PLATFORM EQUAL 32)
# Required on 32-bit systems to enable SSE2 (standard on x64)
set(SSE_FLAGS "-msse2 -mfpmath=sse")

View File

@@ -139,7 +139,7 @@ inline float finiteAlways(float f) { return finite(f) ? f : 0.0f; }
#if COMPILER == COMPILER_MICROSOFT
inline bool myisfinite(float f) { return _finite(f) && !_isnan(f); }
#else
inline bool myisfinite(float f) { return finite(f) && !isnan(f); }
inline bool myisfinite(float f) { return finite(f) && !std::isnan(f); }
#endif
#define atol(a) strtoul( a, NULL, 10)

View File

@@ -20,6 +20,7 @@
#define AZEROTHCORE_LOG_H
#include "Common.h"
#include <ace/Task.h>
#include <ace/Singleton.h>
class WorldPacket;

View File

@@ -19,6 +19,8 @@
#ifndef THREADING_H
#define THREADING_H
#include "Common.h"
#include <ace/ACE.h>
#include <ace/Thread.h>
#include <ace/TSS_T.h>
#include <ace/Atomic_Op.h>