diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index ddb03441881f0dac5c2d3307f02d048ded29e5f0..6fb6f819fef91c8e1eeeedc62dc3f2e46c284e76 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -299,11 +299,16 @@ if (LINUX OR DARWIN) endif (CMAKE_CXX_COMPILER MATCHES ".*clang") if (CMAKE_COMPILER_IS_GNUCXX) - set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-deprecated-copy -Wno-ignored-qualifiers -Wno-unused-function -Wnon-virtual-dtor") + set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-ignored-qualifiers -Wno-unused-function -Wnon-virtual-dtor") elseif (CMAKE_COMPILER_IS_CLANGXX) set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs") endif() + CHECK_CXX_COMPILER_FLAG(-Wdeprecated-copy HAS_DEPRECATED_COPY) + if (HAS_DEPRECATED_COPY) + set(GCC_WARNINGS "${GCC_WARNINGS} -Wno-deprecated-copy") + endif() + if (NOT GCC_DISABLE_FATAL_WARNINGS) # set(GCC_WARNINGS "${GCC_WARNINGS} -Werror") endif (NOT GCC_DISABLE_FATAL_WARNINGS) diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 1559ec15003fedb4bb8307713d1cb7336680f422..7571af1adb4174350d9814411ec839d8dae05330 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -27,7 +27,7 @@ #ifndef LL_LLSTRING_H #define LL_LLSTRING_H -#if LL_GNUC +#if LL_GNUC && GCC_VERSION >= 90000 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-copy-dtor" #endif