From 7288c49cf245ad738bc3ad9c7c83d8c993351c43 Mon Sep 17 00:00:00 2001 From: "senorblanco@chromium.org" Date: Thu, 19 Jan 2012 19:59:22 +0000 Subject: [PATCH] Fix a warning in libtess in Release builds; define NDEBUG in Release on all platforms. BUG: http://code.google.com/p/skia/issues/detail?id=456 Review URL: http://codereview.appspot.com/5555054/ git-svn-id: http://skia.googlecode.com/svn/trunk@3076 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gyp/common_conditions.gypi | 7 +++++-- third_party/glu/gluos.h | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi index e18cbc1f4..99cabc9b1 100644 --- a/gyp/common_conditions.gypi +++ b/gyp/common_conditions.gypi @@ -84,7 +84,8 @@ 'cflags': ['-g'] }, 'Release': { - 'cflags': ['-O2'] + 'cflags': ['-O2'], + 'defines': [ 'NDEBUG' ], }, }, 'cflags': [ @@ -119,6 +120,7 @@ 'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL': '3', }, + 'defines': [ 'NDEBUG' ], }, }, 'xcode_settings': { @@ -161,7 +163,8 @@ 'cflags': ['-g'] }, 'Release': { - 'cflags': ['-O2'] + 'cflags': ['-O2'], + 'defines': [ 'NDEBUG' ], }, }, 'libraries': [ diff --git a/third_party/glu/gluos.h b/third_party/glu/gluos.h index 5da46a57b..e94c67989 100644 --- a/third_party/glu/gluos.h +++ b/third_party/glu/gluos.h @@ -71,7 +71,9 @@ typedef void GLvoid; #define __gl_edgeSign Sk__gl_edgeSign #define __gl_memInit Sk__gl_memInit #define __gl_meshAddEdgeVertex Sk__gl_meshAddEdgeVertex +#ifndef NDEBUG #define __gl_meshCheckMesh Sk__gl_meshCheckMesh +#endif #define __gl_meshConnect Sk__gl_meshConnect #define __gl_meshDelete Sk__gl_meshDelete #define __gl_meshDeleteMesh Sk__gl_meshDeleteMesh