From f6fb7595d34cc53112d013d155df165217ae3d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Tue, 6 Nov 2012 22:17:46 +0100 Subject: [PATCH] Use env.Append when setting compiler settings --- SConstruct | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/SConstruct b/SConstruct index afe9616..b29e777 100644 --- a/SConstruct +++ b/SConstruct @@ -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()