Cmake build: Abort build-configuration if using a too old c++ gnu compiler

This commit is contained in:
Kornel Benko 2015-05-14 21:21:07 +02:00
parent 7fb1dfe61e
commit e3524cefaa

View File

@ -68,8 +68,15 @@ if(LYX_XMINGW)
endif() endif()
if(NOT help AND NOT HELP) if(NOT help AND NOT HELP)
# 'project' triggers the searching for a compiler # 'project' triggers the searching for a compiler
project(${LYX_PROJECT}) project(${LYX_PROJECT})
if (CMAKE_COMPILER_IS_GNUCXX)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.0")
message(STATUS "Gnu CXX compiler version = ${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS "is too old, should be >= 4.0")
message(FATAL_ERROR "Exiting")
endif()
endif()
endif() endif()
if(UNIX) if(UNIX)