add NDEBUG to scons release flags + some pep8 cleanup for examples.

This commit is contained in:
Campbell Barton 2011-02-25 16:19:50 +00:00
parent b25db7c8cb
commit bc15e0e295
20 changed files with 34 additions and 33 deletions

@ -165,8 +165,8 @@ CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
CPPFLAGS = [ '-DXP_UNIX', '-DWIN32', '-DFREE_WINDOWS' ] CPPFLAGS = [ '-DXP_UNIX', '-DWIN32', '-DFREE_WINDOWS' ]
CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ] CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
REL_CFLAGS = [ '-O2' ] REL_CFLAGS = ['-DNDEBUG', '-O2' ]
REL_CCFLAGS = [ '-O2' ] REL_CCFLAGS = ['-DNDEBUG', '-O2' ]
C_WARN = [ '-Wall' , '-Wno-char-subscripts', '-Wdeclaration-after-statement' ] C_WARN = [ '-Wall' , '-Wno-char-subscripts', '-Wdeclaration-after-statement' ]
CC_WARN = [ '-Wall' ] CC_WARN = [ '-Wall' ]

@ -312,14 +312,14 @@ if USE_SDK==True:
#Intel Macs are CoreDuo and Up #Intel Macs are CoreDuo and Up
if MACOSX_ARCHITECTURE == 'i386' or MACOSX_ARCHITECTURE == 'x86_64': if MACOSX_ARCHITECTURE == 'i386' or MACOSX_ARCHITECTURE == 'x86_64':
REL_CFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse'] REL_CFLAGS = ['-DNDEBUG', '-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
REL_CCFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse'] REL_CCFLAGS = ['-DNDEBUG', '-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
else: else:
CFLAGS = CFLAGS+['-fno-strict-aliasing'] CFLAGS = CFLAGS+['-fno-strict-aliasing']
CCFLAGS = CCFLAGS+['-fno-strict-aliasing'] CCFLAGS = CCFLAGS+['-fno-strict-aliasing']
CXXFLAGS = CXXFLAGS+['-fno-strict-aliasing'] CXXFLAGS = CXXFLAGS+['-fno-strict-aliasing']
REL_CFLAGS = ['-O2'] REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-O2'] REL_CCFLAGS = ['-DNDEBUG', '-O2']
# Intel 64bit Macs are Core2Duo and up # Intel 64bit Macs are Core2Duo and up
if MACOSX_ARCHITECTURE == 'x86_64': if MACOSX_ARCHITECTURE == 'x86_64':

@ -180,8 +180,8 @@ CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFI
if WITH_BF_FFMPEG: if WITH_BF_FFMPEG:
# libavutil needs UINT64_C() # libavutil needs UINT64_C()
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ] CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
REL_CFLAGS = ['-O2'] REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-O2'] REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = True ##BF_DEPEND = True
## ##
##AR = ar ##AR = ar

@ -180,8 +180,8 @@ CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFI
if WITH_BF_FFMPEG: if WITH_BF_FFMPEG:
# libavutil needs UINT64_C() # libavutil needs UINT64_C()
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ] CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
REL_CFLAGS = ['-O2'] REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-O2'] REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = True ##BF_DEPEND = True
## ##
##AR = ar ##AR = ar

@ -180,8 +180,8 @@ CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFI
if WITH_BF_FFMPEG: if WITH_BF_FFMPEG:
# libavutil needs UINT64_C() # libavutil needs UINT64_C()
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ] CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
REL_CFLAGS = ['-O2'] REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-O2'] REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = True ##BF_DEPEND = True
## ##
##AR = ar ##AR = ar

@ -163,8 +163,8 @@ CCFLAGS = ['-pipe','-fPIC', '-n32']
CPPFLAGS = [] CPPFLAGS = []
CXXFLAGS = ['-pipe','-fPIC', '-n32'] CXXFLAGS = ['-pipe','-fPIC', '-n32']
REL_CFLAGS = ['-O2'] REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-O2'] REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = 'true' ##BF_DEPEND = 'true'
## ##
##AR = ar ##AR = ar

@ -198,8 +198,8 @@ CXXFLAGS += ['-fpermissive']
if WITH_BF_FFMPEG: if WITH_BF_FFMPEG:
# libavutil needs UINT64_C() # libavutil needs UINT64_C()
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ] CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
REL_CFLAGS = ['-O2'] REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-O2'] REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = True ##BF_DEPEND = True
## ##
##AR = ar ##AR = ar

@ -176,8 +176,8 @@ CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE'] CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE']
CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ] CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
REL_CFLAGS = [ '-O2' ] REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = [ '-O2' ] REL_CCFLAGS = ['-DNDEBUG', '-O2']
C_WARN = ['-Wall', '-Wstrict-prototypes', '-Wno-char-subscripts', '-Wdeclaration-after-statement'] C_WARN = ['-Wall', '-Wstrict-prototypes', '-Wno-char-subscripts', '-Wdeclaration-after-statement']
CC_WARN = [ '-Wall' ] CC_WARN = [ '-Wall' ]

@ -122,8 +122,8 @@ CFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
CPPFLAGS = [] CPPFLAGS = []
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing'] CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing'] CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
REL_CFLAGS = ['-O2'] REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-O2'] REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = True ##BF_DEPEND = True
## ##
##AR = ar ##AR = ar

@ -138,8 +138,8 @@ CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
CPPFLAGS = ['-DSUN_OGL_NO_VERTEX_MACROS'] CPPFLAGS = ['-DSUN_OGL_NO_VERTEX_MACROS']
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing'] CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
REL_CFLAGS = ['-O2'] REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = ['-O2'] REL_CCFLAGS = ['-DNDEBUG', '-O2']
##BF_DEPEND = True ##BF_DEPEND = True
## ##
##AR = ar ##AR = ar

@ -166,8 +166,8 @@ CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE'] CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE']
CXXFLAGS = ['-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing' ] CXXFLAGS = ['-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing' ]
REL_CFLAGS = [ '-O2' ] REL_CFLAGS = ['-DNDEBUG', '-O2']
REL_CCFLAGS = [ '-O2' ] REL_CCFLAGS = ['-DNDEBUG', '-O2']
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes'] C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']

@ -8,6 +8,7 @@ Custom properties can be added to any subclass of an :class:`ID`,
import bpy import bpy
# Assign a collection # Assign a collection
class SceneSettingItem(bpy.types.PropertyGroup): class SceneSettingItem(bpy.types.PropertyGroup):
name = bpy.props.StringProperty(name="Test Prop", default="Unknown") name = bpy.props.StringProperty(name="Test Prop", default="Unknown")

@ -10,6 +10,7 @@ The function menu_draw acts like Menu.draw
""" """
import bpy import bpy
def menu_draw(self, context): def menu_draw(self, context):
self.layout.operator("wm.save_homefile") self.layout.operator("wm.save_homefile")

@ -51,7 +51,6 @@ class ModalOperator(bpy.types.Operator):
return {'RUNNING_MODAL'} return {'RUNNING_MODAL'}
bpy.utils.register_class(ModalOperator) bpy.utils.register_class(ModalOperator)
# test call # test call

@ -24,7 +24,6 @@ class ObjectSelectPanel(bpy.types.Panel):
obj = context.object obj = context.object
layout.prop(obj, "select", text="") layout.prop(obj, "select", text="")
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout

@ -6,6 +6,7 @@ A mix-in parent class can be used to share common properties and
""" """
import bpy import bpy
class View3DPanel(): class View3DPanel():
bl_space_type = 'VIEW_3D' bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS' bl_region_type = 'TOOLS'