From 5ab3a832d32c7bcef6827e0916e94246980b0234 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Fri, 17 Oct 2014 12:35:26 -0700 Subject: Update to build on Xcode 6.0: turn OFF warnings as errors for overloaded virtuals [-Wno-overloaded-virtual] --- indra/cmake/00-Common.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index a24bdf4bf5..008e27f061 100755 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -205,7 +205,17 @@ endif (DARWIN) if (LINUX OR DARWIN) + if (CMAKE_CXX_COMPILER MATCHES ".*clang") + set(CMAKE_COMPILER_IS_CLANGXX 1) + endif (CMAKE_CXX_COMPILER MATCHES ".*clang") + + if (CMAKE_COMPILER_IS_GNUCXX) set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs") + elseif (CMAKE_COMPILER_IS_CLANGXX) + # These unused warnings really ought to be cleaned up over time + set(UNUSED_WARNINGS "-Wno-overloaded-virtual") + set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs ${UNUSED_WARNINGS}") + endif() if (NOT GCC_DISABLE_FATAL_WARNINGS) set(GCC_WARNINGS "${GCC_WARNINGS} -Werror") -- cgit v1.2.3