Use env.Append when setting compiler settings
This commit is contained in:
+6
-7
@@ -1,5 +1,4 @@
|
||||
import os
|
||||
import platform
|
||||
|
||||
#version info of the library
|
||||
revision = svn_version = os.popen('svnversion').read()[:-1]
|
||||
@@ -55,18 +54,18 @@ env = Environment(tools = ['default', 'textfile'])
|
||||
env.AddMethod(InstallPerm)
|
||||
Export('env', 'build_type', 'prefix', 'version_info', 'test_xml')
|
||||
|
||||
env['CFLAGS'] = ['-Wall', '-Wextra', '-pipe', '-ggdb']
|
||||
env['LINKFLAGS'] = ['-O2']
|
||||
env['CPPDEFINES'] = ['_FILE_OFFSET_BITS=64']
|
||||
env.Append(CFLAGS = ['-Wall', '-Wextra', '-pipe', '-ggdb'])
|
||||
env.Append(LINKFLAGS = ['-O2'])
|
||||
env.Append(CPPDEFINES = ['_FILE_OFFSET_BITS=64'])
|
||||
|
||||
if build_type == 'release':
|
||||
env['CFLAGS'] += ['-O2']
|
||||
env.Append(CFLAGS = ['-O2'])
|
||||
|
||||
#this will turn off assert()
|
||||
env['CPPDEFINES'] += ['NDEBUG']
|
||||
env.Append(CPPDEFINES = ['NDEBUG'])
|
||||
|
||||
elif build_type == 'debug':
|
||||
env['CPPDEFINES'] += ['DEBUG']
|
||||
env.Append(CPPDEFINES = ['DEBUG'])
|
||||
|
||||
#put all .sconsign files in one place
|
||||
env.SConsignFile()
|
||||
|
||||
Reference in New Issue
Block a user