diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-06-18 11:55:02 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-06-18 18:55:27 +0000 |
commit | c6007e8d26a5fc2471242fbe571bf52284beaae3 (patch) | |
tree | b0cbd064ba6e739f59af345f4ae223451759f9d2 /CMakeLists.txt | |
parent | 5e5e2019ee09fb0901f35948f570baff8a884adb (diff) |
We don't need -Werror=unknown-warning-option with Clang.
check_c_compiler_flag checks for the message Clang prints for an unknown
warning option ("unknown warning option '-WXXX'"), and fails if it's
produced, so we don't need to force the compiler to fail by passing it
-Werror=unknown-warning-option.
(Yes, the CMake way of handling those annoying options is different from
the way we do that in autotools - autotools adds flags to force errors,
CMake checks for the warning messages - but that's OK.)
Change-Id: I5c2e5d6f4826eba7048736d5134d20417778276a
Reviewed-on: https://code.wireshark.org/review/2400
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 874a661701..802d702cc1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -336,16 +336,10 @@ include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) if(NOT DISABLE_WERROR AND NOT ENABLE_EXTRA_COMPILER_WARNINGS) - check_c_compiler_flag(-Werror=unknown-warning-option WERR_UNKNOWN) check_c_compiler_flag(-Werror WERROR) else() - set(WERR_UNKNOWN FALSE) set(WERROR FALSE) endif() -# string of additional compile command line flags for check_c_compiler_flag -if(WERR_UNKNOWN) - set(CMAKE_REQUIRED_FLAGS -Werror=unknown-warning-option ) -endif() # Sigh: Have to use THIS_FLAG instead of ${F} for some reason foreach(THIS_FLAG ${C_FLAG_TESTS}) |