diff options
author | João Valverde <j@v6e.pt> | 2022-11-12 21:07:13 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2022-11-17 11:22:57 +0000 |
commit | e1d492e2e0324b8c6cf6b784b5229cebb05c6415 (patch) | |
tree | bb1bc25ccf68249dfd95e385a8f5a6a7816ec445 /CMakeLists.txt | |
parent | 2443df73184f22d2a9b49e82e12a9ebb9dffeb14 (diff) |
CMake: Do not disable -Werror with "extra compiler warnings"
Give the ENABLE_WERROR option full control of -Werror. Silently
overriding the user configuration is potentially confusing and
unnecessary.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 05faf67326..a0b8be2571 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -718,7 +718,7 @@ else() # ! MSVC # These are not enabled by default, because the warnings they # produce are very hard or impossible to eliminate. # - if(ENABLE_EXTRA_COMPILER_WARNINGS) # This overrides -Werror + if(ENABLE_EXTRA_COMPILER_WARNINGS) list(APPEND WIRESHARK_COMMON_FLAGS # The following are for C and C++ -Wpedantic @@ -963,7 +963,7 @@ if(MSVC) endif() set(WERROR_COMMON_FLAGS "") -if(ENABLE_WERROR AND NOT ENABLE_EXTRA_COMPILER_WARNINGS) +if(ENABLE_WERROR) if(CMAKE_C_COMPILER_ID MATCHES "MSVC") set(WERROR_COMMON_FLAGS "/WX") else() |