Cmake build: Start demanding at least version 5.1 if compiling with gcc

This commit is contained in:
Kornel Benko 2024-10-24 14:52:22 +02:00
parent cd3d3957c5
commit d6fba3b94e

View File

@ -77,9 +77,10 @@ if(NOT help AND NOT HELP)
# 'project' triggers the searching for a compiler
project(${LYX_PROJECT})
if (CMAKE_COMPILER_IS_GNUCXX)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9")
set(MIN_GCC_VERSION "5.1")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${MIN_GCC_VERSION})
message(STATUS "Gnu CXX compiler version = ${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS "is too old, should be >= 4.9")
message(STATUS "is too old, should be >= ${MIN_GCC_VERSION}")
message(FATAL_ERROR "Exiting")
endif()
endif()