mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
[CORE] Allowing compilation with c++11
This commit is contained in:
@@ -59,7 +59,7 @@ include(CheckPlatform)
|
|||||||
|
|
||||||
# basic packagesearching and setup (further support will be needed, this is a preliminary release!)
|
# basic packagesearching and setup (further support will be needed, this is a preliminary release!)
|
||||||
set(OPENSSL_EXPECTED_VERSION 1.0.0)
|
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(PCHSupport)
|
||||||
find_package(ACE REQUIRED)
|
find_package(ACE REQUIRED)
|
||||||
|
|||||||
@@ -13,3 +13,5 @@ if(WITH_COREDEBUG)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
|
||||||
message(STATUS "Clang: Debug-flags set (-g3)")
|
message(STATUS "Clang: Debug-flags set (-g3)")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-narrowing -Wno-deprecated-register")
|
||||||
|
|||||||
@@ -1,6 +1,18 @@
|
|||||||
# Set build-directive (used in core to tell which buildtype we used)
|
# Set build-directive (used in core to tell which buildtype we used)
|
||||||
add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"')
|
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)
|
if(PLATFORM EQUAL 32)
|
||||||
# Required on 32-bit systems to enable SSE2 (standard on x64)
|
# Required on 32-bit systems to enable SSE2 (standard on x64)
|
||||||
set(SSE_FLAGS "-msse2 -mfpmath=sse")
|
set(SSE_FLAGS "-msse2 -mfpmath=sse")
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ inline float finiteAlways(float f) { return finite(f) ? f : 0.0f; }
|
|||||||
#if COMPILER == COMPILER_MICROSOFT
|
#if COMPILER == COMPILER_MICROSOFT
|
||||||
inline bool myisfinite(float f) { return _finite(f) && !_isnan(f); }
|
inline bool myisfinite(float f) { return _finite(f) && !_isnan(f); }
|
||||||
#else
|
#else
|
||||||
inline bool myisfinite(float f) { return finite(f) && !isnan(f); }
|
inline bool myisfinite(float f) { return finite(f) && !std::isnan(f); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define atol(a) strtoul( a, NULL, 10)
|
#define atol(a) strtoul( a, NULL, 10)
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#define AZEROTHCORE_LOG_H
|
#define AZEROTHCORE_LOG_H
|
||||||
|
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
|
#include <ace/Task.h>
|
||||||
#include <ace/Singleton.h>
|
#include <ace/Singleton.h>
|
||||||
|
|
||||||
class WorldPacket;
|
class WorldPacket;
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef THREADING_H
|
#ifndef THREADING_H
|
||||||
#define THREADING_H
|
#define THREADING_H
|
||||||
|
|
||||||
|
#include "Common.h"
|
||||||
|
#include <ace/ACE.h>
|
||||||
#include <ace/Thread.h>
|
#include <ace/Thread.h>
|
||||||
#include <ace/TSS_T.h>
|
#include <ace/TSS_T.h>
|
||||||
#include <ace/Atomic_Op.h>
|
#include <ace/Atomic_Op.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user