From 2955fc8bb2eb3202a7022d47aaff78055bf3076c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 8 Jun 2016 09:37:43 +0100 Subject: [PATCH] Disabled the -Wextra warnin the warnings that can't be fixed due to optional code paths. --- src/osgShadow/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/osgShadow/CMakeLists.txt b/src/osgShadow/CMakeLists.txt index 2dcd76985..1e2aa74f7 100644 --- a/src/osgShadow/CMakeLists.txt +++ b/src/osgShadow/CMakeLists.txt @@ -5,6 +5,15 @@ ELSE() ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC) ENDIF() + +################################################################################ +## Quieten warnings that a due to optional code paths + +IF(CMAKE_COMPILER_IS_GNUCXX) + # Remove -Wextra flag as it barfs on ffmoeg headers + STRING(REGEX REPLACE "-Wextra" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +ENDIF() + SET(LIB_NAME osgShadow) SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME}) SET(TARGET_H