Make build: amend 6f2cd26103 (allow more compilers)

Allow gcc 4.7 and 4.8, but use boost regex

Allow visual studio 2015.

(cherry picked from commit 1f90cd3b3f)
This commit is contained in:
Jean-Marc Lasgouttes 2019-06-29 16:45:38 +02:00 committed by Kornel Benko
parent 46e29ebe54
commit 24fae9f51b

View File

@ -288,17 +288,21 @@ if(UNIX OR MINGW)
#message(STATUS "dumpversion: error = ${_error}, result = ${_err}") #message(STATUS "dumpversion: error = ${_error}, result = ${_err}")
endif() endif()
message(STATUS "Using GCC version ${GCC_VERSION}") message(STATUS "Using GCC version ${GCC_VERSION}")
if(GCC_VERSION VERSION_LESS 4.9) if(GCC_VERSION VERSION_LESS 4.6)
# Drop support for gcc versions prior to 4.9 message(FATAL_ERROR "gcc >= 4.6 is required.")
message(FATAL_ERROR "gcc >= 4.9 is required.") elseif(GCC_VERSION VERSION_LESS 4.9)
# <regex> in gcc is unusable in versions less than 4.9.0
# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631
set(LYX_USE_STD_REGEX 0)
else() else()
set(LYX_USE_STD_REGEX 1) set(LYX_USE_STD_REGEX 1)
endif() endif()
endif() endif()
set(LYX_GCC11_MODE "${CXX11_FLAG}") set(LYX_GCC11_MODE "${CXX11_FLAG}")
else() else()
# Drop support for msvc versions prior to 1915 if(MSVC_VERSION LESS 1900)
message(FATAL_ERROR "msvc >= 1915 is required.") # Drop support for msvc versions prior to 1900 (Visual Studio 2015)
message(FATAL_ERROR "Visual Studio >= 2015 is required.")
set(LYX_USE_STD_REGEX 0) set(LYX_USE_STD_REGEX 0)
# if(MSVC10) # if(MSVC10)
# set(LYX_USE_STD_REGEX 1) #TODO should we use it in ECMAScript mode? # set(LYX_USE_STD_REGEX 1) #TODO should we use it in ECMAScript mode?