fail early when an incompatible cmake version is found
authorkoda
Fri, 11 Oct 2013 00:04:36 +0200
changeset 9517 217eacb69395
parent 9515 9af6176fcd8f
child 9519 b8b5c82eb61b
fail early when an incompatible cmake version is found
cmake_modules/CMakeDeterminePascalCompiler.cmake
cmake_modules/platform.cmake
--- a/cmake_modules/CMakeDeterminePascalCompiler.cmake	Thu Oct 10 23:33:22 2013 +0200
+++ b/cmake_modules/CMakeDeterminePascalCompiler.cmake	Fri Oct 11 00:04:36 2013 +0200
@@ -5,6 +5,9 @@
 # the cmake variable CMAKE_GENERATOR_PASCAL which can be defined by a generator
 # as a default compiler
 
+# NOTE: on Darwin cmake >= 2.8.11 until cmake <= 2.8.12.1 will add an incompatible
+# -F flag to <FLAGS> so you won't be able to use those versions with this script
+
 if(NOT CMAKE_Pascal_COMPILER)
     # prefer the environment variable FPC
     if($ENV{FPC} MATCHES ".+")
--- a/cmake_modules/platform.cmake	Thu Oct 10 23:33:22 2013 +0200
+++ b/cmake_modules/platform.cmake	Fri Oct 11 00:04:36 2013 +0200
@@ -1,5 +1,10 @@
 
 if(APPLE)
+    if(${CMAKE_VERSION} VERSION_GREATER "2.8.10.2" AND
+       ${CMAKE_VERSION} VERSION_LESS "2.8.12.1")
+        message(FATAL_ERROR "This version of CMake is known *not* to work, please update or use a lower version")
+    endif()
+
     set(CMAKE_FIND_FRAMEWORK "FIRST")
 
     #what system are we building for