summaryrefslogtreecommitdiff
path: root/Modules/CheckCCompilerFlag.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-12-22 09:39:25 -0500
committerBrad King <brad.king@kitware.com>2011-12-22 09:40:32 -0500
commit646cf9193213367b833b7681c3ad7beed1ea946c (patch)
tree95bc699b9d755b3714edb8b5a3a9119916dc3566 /Modules/CheckCCompilerFlag.cmake
parent4e985000124931cb8219da35cc507b4ccf05d30f (diff)
downloadcmake-646cf9193213367b833b7681c3ad7beed1ea946c.tar.gz
CheckCCompilerFlag: Generalize "but not for C" case (#12633)
The "warning: " part is not necessary. The case can happen on any GNU compiler, not just an Apple version.
Diffstat (limited to 'Modules/CheckCCompilerFlag.cmake')
-rw-r--r--Modules/CheckCCompilerFlag.cmake5
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index ec0a773e39..5380f4d024 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -7,7 +7,7 @@
# that can modify the build.
#=============================================================================
-# Copyright 2006-2010 Kitware, Inc.
+# Copyright 2006-2011 Kitware, Inc.
# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
# Distributed under the OSI-approved BSD License (the "License");
@@ -27,8 +27,7 @@ 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 "command line option .* is valid for .* but not for C" # GNU
FAIL_REGEX "unrecognized .*option" # GNU
FAIL_REGEX "unknown .*option" # Clang
FAIL_REGEX "ignoring unknown option" # MSVC