Allow user to override debug/opt CFLAGS

This commit is contained in:
Kp 2013-09-22 23:28:06 +00:00
parent 91f6d5e72d
commit cb8d087007

View file

@ -548,10 +548,12 @@ class DXXCommon(LazyObjectConstructor):
# debug?
if (self.user_settings.debug == 1):
message(self, "including: DEBUG")
env.Append(CPPFLAGS = ['-g'])
env.Prepend(CFLAGS = ['-g'])
env.Prepend(CXXFLAGS = ['-g'])
else:
env.Append(CPPDEFINES = ['NDEBUG', 'RELEASE'])
env.Append(CPPFLAGS = ['-O2'])
env.Prepend(CFLAGS = ['-O2'])
env.Prepend(CXXFLAGS = ['-O2'])
if self.user_settings.memdebug:
message(self, "including: MEMDEBUG")
env.Append(CPPDEFINES = ['DEBUG_MEMORY_ALLOCATIONS'])