summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohannes Walcher <johannes.walcher@stusta.de>2018-07-10 10:39:28 +0200
committermujx <mujx@users.noreply.github.com>2018-07-10 11:39:28 +0300
commitcfaecaab17c07c7542b6502159f11622813ad01b (patch)
tree26670818aed0ddbf78d3ea6da84020d44f6596ec
parentDon't pre-load messages from caches (diff)
downloadnheko-cfaecaab17c07c7542b6502159f11622813ad01b.tar.xz
Limit -Wshadow to non-gcc (#368)
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt

index 30e2cd18..7aa75a3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -96,13 +96,17 @@ if(NOT MSVC) -Wall \ -Wextra \ -Werror \ - -Wshadow \ -pipe \ -pedantic \ -fsized-deallocation \ -fdiagnostics-color=always \ -Wunreachable-code" ) + if (NOT CMAKE_COMPILER_IS_GNUCXX) + # -Wshadow is buggy and broken in GCC, so do not enable it. + # see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79328 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow") + endif() endif() if(NOT (CMAKE_BUILD_TYPE OR CMAKE_CONFIGURATION_TYPES))