From eabbde0701e021488ce18a1ee37c481e1938a2d6 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Mon, 8 Jul 2019 08:33:03 +0300 Subject: [PATCH] =?UTF-8?q?-Wshadow=20=D1=82=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE?= =?UTF-8?q?=20=D0=B4=D0=BB=D1=8F=20GCC=20>=3D=204.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibCompilerFlags.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMLibCompilerFlags.cmake b/CMLibCompilerFlags.cmake index 9747726..9234fe9 100644 --- a/CMLibCompilerFlags.cmake +++ b/CMLibCompilerFlags.cmake @@ -84,7 +84,6 @@ if(CMAKE_CXX_COMPILER_IS_CLANG check_enable_cxx_flag(-Wno-variadic-macros) check_enable_cxx_flag(-Wno-parentheses) check_enable_cxx_flag(-Wstrict-null-sentinel) - check_enable_cxx_flag(-Wshadow) check_enable_cxx_flag(-Wshadow-all) endif() @@ -111,6 +110,10 @@ if(CMAKE_CXX_COMPILER_IS_GCC) # Let's just disable the warning for now. check_enable_cxx_flag(-Wno-attributes) endif() + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.799") + # -Wshadow gives a lot of false positives with GCC 4.7.2 in Astra Linux 1.5 + check_enable_cxx_flag(-Wshadow) + endif() endif() if(CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k")