Buildsystem/GCC: Enforce version 4.7.2 and enable c++11 compilation
This commit is contained in:
1 parent
e469ff5e88
commit
3affa3a824
1 file changed
+9
@@ -1,6 +1,15 @@
|
|||||||
# 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.7.2)
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION)
|
||||||
|
message(FATAL_ERROR "GCC: TrinityCore 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")
|
||||||
|
|
||||||
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")
|
||||||
|
|||||||
Reference in new issue
Block a user