Files
xahaud/python/beast/env/AddCommonFlags.py
Tom Ritchford 6b0cec1189 Improvements to scons build for beast.
* Common code extracted to Python directories.
* Read ~/.scons file for scons environment defaults.
* Override scons settings with shell environment variables.
* New "tags" for debug, nodebug, optimize, nooptimize builds.
* Universal platform detection.
* Default value of environment variables set through prefix dictionaries.
* Check for correct Boost value and fail otherwise.
* Extract git describe --tags into a preprocesor variable, -DTIP_BRANCH
* More colors - blue for unchanged defaults, green for changed defaults, red for error.
* Contain unit tests for non-obvious stuff.
* Check to see that boost libraries have been built.
* Right now, we accept both .dylib and .a versions but it'd be easy to enforce .a only.
2014-04-11 10:40:26 -07:00

12 lines
403 B
Python

from __future__ import absolute_import, division, print_function, unicode_literals
from beast.util import Boost
from beast.util import Git
def add_common_flags(env):
git_flag = '-DTIP_BRANCH="%s"' % Git.describe()
env['CPPFLAGS'] = '%s %s' % (env['CPPFLAGS'], git_flag)
env['CPPPATH'].insert(0, Boost.CPPPATH)
env['LIBPATH'].append(Boost.LIBPATH)
env['BOOST_HOME'] = Boost.CPPPATH