diff options
author | David Cole <david.cole@kitware.com> | 2011-08-02 19:09:49 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-08-02 19:09:49 (GMT) |
commit | be3ac14ac707b4d2973ca9854450b849c0968e83 (patch) | |
tree | 56721e38d9d709ec34fd9bf735507bec55df90b6 /Modules | |
parent | c6051b7abd093707ad3779a9a29cbf772355e8f5 (diff) | |
parent | b7f3f7cdb62fcadba806aca8168c88a9a637eda6 (diff) | |
download | CMake-be3ac14ac707b4d2973ca9854450b849c0968e83.zip CMake-be3ac14ac707b4d2973ca9854450b849c0968e83.tar.gz CMake-be3ac14ac707b4d2973ca9854450b849c0968e83.tar.bz2 |
Merge topic 'add-flag-detection-regex'
b7f3f7c Add fail regex to detect supported warning flags correctly.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CheckCCompilerFlag.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
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) - |