Additional patch for gcc warning.

This commit is contained in:
Richard M. Shaw 2016-02-04 13:08:59 -06:00
parent e5a7404938
commit 9404230670
1 changed files with 32 additions and 0 deletions

View File

@ -69,3 +69,35 @@ index e2b16d4..9a5c985 100644
#define DEBUG_XMP_READ 0
#define DEBUG_XMP_WRITE 0
From 792497cf71136d1b7b21c059ed020e40b8d35f6c Mon Sep 17 00:00:00 2001
From: Larry Gritz <lg@larrygritz.com>
Date: Thu, 4 Feb 2016 11:04:15 -0800
Subject: [PATCH] Suppress gcc6 warning
---
CMakeLists.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9d6786c..19c413b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -139,7 +139,7 @@ if (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_APPLECLANG)
endif ()
# gcc specific options
-if (CMAKE_COMPILER_IS_GNUCC AND (NOT CMAKE_COMPILER_IS_CLANG))
+if (CMAKE_COMPILER_IS_GNUCC AND NOT (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_APPLECLANG))
if (NOT ${GCC_VERSION} VERSION_LESS 4.8)
# suppress a warning that Boost::Python hits in g++ 4.8
add_definitions ("-Wno-error=unused-local-typedefs")
@@ -148,6 +148,9 @@ if (CMAKE_COMPILER_IS_GNUCC AND (NOT CMAKE_COMPILER_IS_CLANG))
if (NOT ${GCC_VERSION} VERSION_LESS 4.5)
add_definitions ("-Wno-unused-result")
endif ()
+ if (NOT ${GCC_VERSION} VERSION_LESS 6.0)
+ add_definitions ("-Wno-error=misleading-indentation")
+ endif ()
endif ()
# Try to detect if this is an OSX distro new enough that the system library