diff options
author | Yehonal <yehonal.azeroth@gmail.com> | 2016-08-10 12:39:25 +0200 |
---|---|---|
committer | Yehonal <yehonal.azeroth@gmail.com> | 2016-08-10 12:39:53 +0200 |
commit | fc8599299e785cd18a483fa6e6e64bb63db73f0e (patch) | |
tree | fb90a29815a5f85f4b57d318d05b72f7eb487d76 /src/cmake/compiler/gcc/settings.cmake | |
parent | 6f7a0465750ac11c668e1cfd5fa2502059325f10 (diff) |
[CORE] Allowing compilation with c++11
Diffstat (limited to 'src/cmake/compiler/gcc/settings.cmake')
-rw-r--r-- | src/cmake/compiler/gcc/settings.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cmake/compiler/gcc/settings.cmake b/src/cmake/compiler/gcc/settings.cmake index 25ee96c856..bd6df376fa 100644 --- a/src/cmake/compiler/gcc/settings.cmake +++ b/src/cmake/compiler/gcc/settings.cmake @@ -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") |