commit e3524cefaa9bc6ebe1b9f0d31ad627dbb8bfb9d8
Author: Kornel Benko <[email protected]>
Date: Thu May 14 21:21:07 2015 +0200
Cmake build: Abort build-configuration if using a too old c++ gnu compiler
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 785e37e..5315326 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,8 +68,15 @@ if(LYX_XMINGW)
endif()
if(NOT help AND NOT HELP)
- # 'project' triggers the searching for a compiler
- project(${LYX_PROJECT})
+ # 'project' triggers the searching for a compiler
+ 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()
if(UNIX)