mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 22:26:22 +00:00
[CORE] Allowing compilation with c++11
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user