Change minimum GCC version to 4.8

develop
lethosor 2016-12-11 00:23:16 -05:00
parent 4b91d3799e
commit 4c0cb6854f
1 changed files with 2 additions and 5 deletions

@ -24,17 +24,14 @@ project(dfhack)
macro(CHECK_GCC COMPILER_PATH)
execute_process(COMMAND ${COMPILER_PATH} -dumpversion OUTPUT_VARIABLE GCC_VERSION_OUT)
string(STRIP "${GCC_VERSION_OUT}" GCC_VERSION_OUT)
if (${GCC_VERSION_OUT} VERSION_LESS "4.5")
message(SEND_ERROR "${COMPILER_PATH} version ${GCC_VERSION_OUT} cannot be used - use GCC 4.5 or later")
if (${GCC_VERSION_OUT} VERSION_LESS "4.8")
message(SEND_ERROR "${COMPILER_PATH} version ${GCC_VERSION_OUT} cannot be used - use GCC 4.8 or later")
elseif (${GCC_VERSION_OUT} VERSION_GREATER "4.9.9")
# GCC 5 changes ABI name mangling to enable C++11 changes.
# This must be disabled to enable linking against DF.
# http://developerblog.redhat.com/2015/02/05/gcc5-and-the-c11-abi/
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
endif()
if(${GCC_VERSION_OUT} VERSION_LESS "4.8")
message(WARNING "You are using GCC < 4.8 (detected version: ${GCC_VERSION_OUT}). Support for GCC versions before 4.8 may be removed in the future.")
endif()
endmacro()
if(UNIX)