compiler flag fixes
[alexxy/gromacs.git] / CMakeLists.txt
index 77cbe0dcf3053587d1a453a74314e97ef07d3c1e..0218f6d73bdbdd37e40abb77e40f6ee5674bef61 100644 (file)
@@ -93,19 +93,6 @@ ENDIF()
 
 set(GMX_EXTRA_LIBRARIES)
 
-
-
-######################################################################
-# compiler tests
-# these need ot be done early (before further tests).
-#####################################################################
-
-include(CheckCCompilerFlag)
-include(CheckCXXCompilerFlag)
-
-include(gmxCFlags)
-gmx_c_flags()
-
 ########################################################################
 # User input options                                                   #
 ########################################################################
@@ -155,6 +142,24 @@ if(UNIX AND NOT APPLE)
     mark_as_advanced(GMX_PREFER_STATIC_LIBS)
 endif()
 
+
+######################################################################
+# compiler tests
+# these need ot be done early (before further tests).
+#####################################################################
+
+# cmake/Check{C,CXX}CompilerFlag.cmake are lifted from CMake git next
+# branch (proposed for v2.8.9) to be able to detect invalid options
+# with the Intel Compilers.
+# Remove these files from the source tree when a CMake version that
+# includes the features in question becomes required.
+include(CheckCCompilerFlag)
+include(CheckCXXCompilerFlag)
+
+include(gmxCFlags)
+gmx_c_flags()
+
+
 ########################################################################
 # Set up binary and library suffixing 
 ########################################################################
@@ -210,7 +215,6 @@ include(gmxManageMPI)
 # Check for options incompatible with OpenMM build                    #
 #######################################################################
 if(GMX_OPENMM)
-    cmake_minimum_required(VERSION 2.6.4)
     # we'll use the built-in fft to avoid unnecessary dependencies
     string(TOUPPER ${GMX_FFT_LIBRARY} GMX_FFT_LIBRARY)
     if(NOT ${GMX_FFT_LIBRARY} STREQUAL "FFTPACK")