mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Implement gcc version check for cmake
This commit is contained in:
parent
ad63374e26
commit
c2433d8b8f
@ -260,11 +260,7 @@ if(LYX_ENABLE_CXX11 MATCHES "AUTO")
|
||||
else()
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT GCC_VERSION VERSION_LESS 4.3)
|
||||
set(LYX_ENABLE_CXX11 ON CACHE TYPE STRING FORCE)
|
||||
else()
|
||||
set(LYX_ENABLE_CXX11 OFF CACHE TYPE STRING FORCE)
|
||||
endif()
|
||||
else()
|
||||
# Not a gnu compiler
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "^[cC]lang$")
|
||||
@ -280,6 +276,9 @@ if(UNIX OR MINGW)
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
message(STATUS "Using GCC version ${GCC_VERSION}")
|
||||
if(GCC_VERSION VERSION_LESS 4.9)
|
||||
if(GCC_VERSION VERSION_LESS 4.3)
|
||||
message(FATAL_ERROR "gcc >= 4.3 is required.")
|
||||
endif()
|
||||
# <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)
|
||||
|
Loading…
Reference in New Issue
Block a user