[Cmake-commits] CMake branch, next, updated. v2.8.5-1316-g819979a
David Cole
david.cole at kitware.com
Wed Jul 27 18:20:42 EDT 2011
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 819979a11ae840c52e553227417b1ea7212e7667 (commit)
via b7f3f7cdb62fcadba806aca8168c88a9a637eda6 (commit)
via 49a00ec2def5882aa056638c3ae0b3088157de93 (commit)
from 117120b3208354440fe14b997faa5f708abf5cc8 (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=819979a11ae840c52e553227417b1ea7212e7667
commit 819979a11ae840c52e553227417b1ea7212e7667
Merge: 117120b b7f3f7c
Author: David Cole <david.cole at kitware.com>
AuthorDate: Wed Jul 27 18:20:39 2011 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jul 27 18:20:39 2011 -0400
Merge topic 'add-flag-detection-regex' into next
b7f3f7c Add fail regex to detect supported warning flags correctly.
49a00ec KWSys Nightly Date Stamp
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7f3f7cdb62fcadba806aca8168c88a9a637eda6
commit b7f3f7cdb62fcadba806aca8168c88a9a637eda6
Author: David Cole <david.cole at kitware.com>
AuthorDate: Wed Jul 27 15:01:50 2011 -0400
Commit: David Cole <david.cole at kitware.com>
CommitDate: Wed Jul 27 15:01:50 2011 -0400
Add fail regex to detect supported warning flags correctly.
On Apple's gcc, the compiler emits a warning such as "warning: command
line option "-Wno-deprecated" is valid for C++/ObjC++ but not for C"
when it is passed that flag on its command line.
When testing for that flag with a plain C file, we should report that
the flag is unsupported for C files. The new FAIL_REGEX option added
here produces this behavior.
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index a03b64d..a390b38 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -27,6 +27,8 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" ${_RESULT}
# Some compilers do not fail with a bad flag
+ FAIL_REGEX "warning: command line option .* is valid for .* but not for C"
+ # Apple gcc
FAIL_REGEX "unrecognized .*option" # GNU
FAIL_REGEX "ignoring unknown option" # MSVC
FAIL_REGEX "warning D9002" # MSVC, any lang
@@ -36,4 +38,3 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
)
SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
ENDMACRO (CHECK_C_COMPILER_FLAG)
-
-----------------------------------------------------------------------
Summary of changes:
Modules/CheckCCompilerFlag.cmake | 3 ++-
Source/kwsys/kwsysDateStamp.cmake | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list