[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3860-g4e9e69c

Rolf Eike Beer eike at sf-mail.de
Tue Aug 13 15:17:10 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  4e9e69cc769d4aaad40881b21fff94e915ae6efd (commit)
       via  17eb11cb01c586587804be3b2ba8bac4bc78c151 (commit)
       via  01cab8907e003c74c539cdc252341caaba4edd7a (commit)
      from  c4e818b160744502564009c2f3917532655490a3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4e9e69cc769d4aaad40881b21fff94e915ae6efd
commit 4e9e69cc769d4aaad40881b21fff94e915ae6efd
Merge: c4e818b 17eb11c
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Aug 13 15:17:07 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Aug 13 15:17:07 2013 -0400

    Merge topic 'cxx-flags' into next
    
    17eb11c CheckC*CompilerFlags: move common patterns to their own file
    01cab89 CheckC*CompilerFlag: add documentation what to expect from a positive result


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=17eb11cb01c586587804be3b2ba8bac4bc78c151
commit 17eb11cb01c586587804be3b2ba8bac4bc78c151
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Aug 13 21:10:17 2013 +0200
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Tue Aug 13 21:13:19 2013 +0200

    CheckC*CompilerFlags: move common patterns to their own file

diff --git a/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake b/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake
new file mode 100644
index 0000000..07e0879
--- /dev/null
+++ b/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake
@@ -0,0 +1,39 @@
+#=============================================================================
+# Copyright 2006-2011 Kitware, Inc.
+# Copyright 2006 Alexander Neundorf <neundorf at kde.org>
+# Copyright 2011 Matthias Kretz <kretz at kde.org>
+# Copyright 2013 Rolf Eike Beer <eike at sf-mail.de>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+# Do NOT include this module directly into any of your code. It is meant as
+# a library for Check*CompilerFlag.cmake modules. It's content may change in
+# any way between releases.
+
+macro (CHECK_COMPILER_FLAG_COMMON_PATTERNS _VAR)
+   set(${_VAR}
+     FAIL_REGEX "unrecognized .*option"                     # GNU
+     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 "invalid argument .*option"                 # Intel
+     FAIL_REGEX "ignoring option .*argument required"       # Intel
+     FAIL_REGEX "[Uu]nknown option"                         # HP
+     FAIL_REGEX "[Ww]arning: [Oo]ption"                     # SunPro
+     FAIL_REGEX "command option .* is not recognized"       # XL
+     FAIL_REGEX "command option .* contains an incorrect subargument" # XL
+     FAIL_REGEX "not supported in this configuration; ignored"       # AIX
+     FAIL_REGEX "File with unknown suffix passed to linker" # PGI
+     FAIL_REGEX "WARNING: unknown flag:"                    # Open64
+     FAIL_REGEX "Incorrect command line option:"            # Borland
+   )
+endmacro ()
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index 046f93f..dab5710 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -26,26 +26,7 @@
 #  License text for the above reference.)
 
 include(CheckCSourceCompiles)
-
-macro (CHECK_COMPILER_FLAG_COMMON_PATTERNS _VAR)
-   set(${_VAR}
-     FAIL_REGEX "unrecognized .*option"                     # GNU
-     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 "invalid argument .*option"                 # Intel
-     FAIL_REGEX "ignoring option .*argument required"       # Intel
-     FAIL_REGEX "[Uu]nknown option"                         # HP
-     FAIL_REGEX "[Ww]arning: [Oo]ption"                     # SunPro
-     FAIL_REGEX "command option .* is not recognized"       # XL
-     FAIL_REGEX "command option .* contains an incorrect subargument" # XL
-     FAIL_REGEX "not supported in this configuration; ignored"       # AIX
-     FAIL_REGEX "File with unknown suffix passed to linker" # PGI
-     FAIL_REGEX "WARNING: unknown flag:"                    # Open64
-     FAIL_REGEX "Incorrect command line option:"            # Borland
-   )
-endmacro ()
+include(CMakeCheckCompilerFlagCommonPatterns)
 
 macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
    set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake
index 00f2bcd..4435a1f 100644
--- a/Modules/CheckCXXCompilerFlag.cmake
+++ b/Modules/CheckCXXCompilerFlag.cmake
@@ -26,14 +26,7 @@
 #  License text for the above reference.)
 
 include(CheckCXXSourceCompiles)
-
-# This is a function to have the include in a scope to force people to
-# explicitely include CheckCCompilerFlag if they need it.
-function (CHECK_CXX_COMPILER_FLAG_COMMON_PATTERNS _VAR)
-   include(CheckCCompilerFlag)
-   CHECK_COMPILER_FLAG_COMMON_PATTERNS(${_VAR})
-   set(${_VAR} ${${_VAR}} PARENT_SCOPE)
-endfunction ()
+include(CMakeCheckCompilerFlagCommonPatterns)
 
 macro (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
    set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
@@ -45,7 +38,7 @@ macro (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
      set(_CheckCXXCompilerFlag_SAVED_${v} "$ENV{${v}}")
      set(ENV{${v}} C)
    endforeach()
-   CHECK_CXX_COMPILER_FLAG_COMMON_PATTERNS(_CheckCXXCompilerFlag_COMMON_PATTERNS)
+   CHECK_COMPILER_FLAG_COMMON_PATTERNS(_CheckCXXCompilerFlag_COMMON_PATTERNS)
    CHECK_CXX_SOURCE_COMPILES("int main() { return 0; }" ${_RESULT}
      # Some compilers do not fail with a bad flag
      FAIL_REGEX "command line option .* is valid for .* but not for C\\\\+\\\\+" # GNU

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=01cab8907e003c74c539cdc252341caaba4edd7a
commit 01cab8907e003c74c539cdc252341caaba4edd7a
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Aug 13 21:06:19 2013 +0200
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Tue Aug 13 21:06:19 2013 +0200

    CheckC*CompilerFlag: add documentation what to expect from a positive result

diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index d8cc2d3..046f93f 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -6,6 +6,9 @@
 # sets CMAKE_REQUIRED_DEFINITIONS to <flag>.
 # See help for CheckCSourceCompiles for a listing of variables
 # that can otherwise modify the build.
+# The result only tells that the compiler does not give an error message when
+# it encounters the flag. If the flag has any effect or even a specific one is
+# beyond the scope of this module.
 
 #=============================================================================
 # Copyright 2006-2011 Kitware, Inc.
diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake
index f1b07bc..00f2bcd 100644
--- a/Modules/CheckCXXCompilerFlag.cmake
+++ b/Modules/CheckCXXCompilerFlag.cmake
@@ -6,6 +6,9 @@
 # sets CMAKE_REQUIRED_DEFINITIONS to <flag>.
 # See help for CheckCXXSourceCompiles for a listing of variables
 # that can otherwise modify the build.
+# The result only tells that the compiler does not give an error message when
+# it encounters the flag. If the flag has any effect or even a specific one is
+# beyond the scope of this module.
 
 #=============================================================================
 # Copyright 2006-2010 Kitware, Inc.

-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeCheckCompilerFlagCommonPatterns.cmake |   39 ++++++++++++++++++++
 Modules/CheckCCompilerFlag.cmake                   |   24 ++----------
 Modules/CheckCXXCompilerFlag.cmake                 |   14 +++-----
 3 files changed, 48 insertions(+), 29 deletions(-)
 create mode 100644 Modules/CMakeCheckCompilerFlagCommonPatterns.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list