From 1ff143da970b561978b470f179f5dfcef7a4e832 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Sat, 17 Nov 2012 21:40:10 +0100 Subject: [PATCH] Minor updates to CMake usage Change-Id: Ie917ccd041c7576afb82ddef7b82598f462c7548 --- CMakeLists.txt | 14 +++++++------- cmake/CheckCCompilerFlag.cmake | 5 +++-- cmake/CheckCXXCompilerFlag.cmake | 3 ++- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d0e166a7c4..03a0bf1baf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,15 +209,15 @@ option(GMX_CYCLE_SUBCOUNTERS "Enable cycle subcounters to get a more detailed cy mark_as_advanced(GMX_CYCLE_SUBCOUNTERS) ###################################################################### -# compiler tests -# these need ot be done early (before further tests). +# Compiler tests +# These need to 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. +# The cmake/Check{C,CXX}CompilerFlag.cmake files in the GROMACS distribution +# are used with permission from CMake v2.8.9 so that GROMACS can detect +# invalid options with the Intel Compilers. +# These files should be removed from the source tree when a CMake version that +# includes the features in question becomes required for building GROMACS. include(CheckCCompilerFlag) if(CMAKE_CXX_COMPILER_LOADED) include(CheckCXXCompilerFlag) diff --git a/cmake/CheckCCompilerFlag.cmake b/cmake/CheckCCompilerFlag.cmake index 5ce5f1a1a2..e65ba1b4a6 100644 --- a/cmake/CheckCCompilerFlag.cmake +++ b/cmake/CheckCCompilerFlag.cmake @@ -7,8 +7,9 @@ # that can modify the build. #============================================================================= -# Copyright 2006-2010 Kitware, Inc. +# Copyright 2006-2011 Kitware, Inc. # Copyright 2006 Alexander Neundorf +# Copyright 2011 Matthias Kretz # # ORIGINAL Copyright notice (from Copyright.txt): # @@ -57,7 +58,7 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT) FAIL_REGEX "unknown .*option" # Clang FAIL_REGEX "ignoring unknown option" # MSVC FAIL_REGEX "warning D9002" # MSVC, any lang - FAIL_REGEX "option .*not supported" # Intel + FAIL_REGEX "option.*not supported" # Intel FAIL_REGEX "invalid argument .*option" # Intel FAIL_REGEX "ignoring option .*argument required" # Intel FAIL_REGEX "[Uu]nknown option" # HP diff --git a/cmake/CheckCXXCompilerFlag.cmake b/cmake/CheckCXXCompilerFlag.cmake index 4c2caa69ea..e589fddf06 100644 --- a/cmake/CheckCXXCompilerFlag.cmake +++ b/cmake/CheckCXXCompilerFlag.cmake @@ -9,6 +9,7 @@ #============================================================================= # Copyright 2006-2010 Kitware, Inc. # Copyright 2006 Alexander Neundorf +# Copyright 2011 Matthias Kretz # # ORIGINAL Copyright notice (from Copyright.txt): # @@ -57,7 +58,7 @@ MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT) FAIL_REGEX "unknown .*option" # Clang FAIL_REGEX "ignoring unknown option" # MSVC FAIL_REGEX "warning D9002" # MSVC, any lang - FAIL_REGEX "option .*not supported" # Intel + FAIL_REGEX "option.*not supported" # Intel FAIL_REGEX "invalid argument .*option" # Intel FAIL_REGEX "ignoring option .*argument required" # Intel FAIL_REGEX "[Uu]nknown option" # HP -- 2.11.4.GIT