From: g0dil Date: Tue, 30 Oct 2007 16:12:55 +0000 (+0000) Subject: Link statically against boost_unit_test_framework library X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=5fbfcae374466c0d8d631d93e1fd58a5b7eea7d3;p=senf.git Link statically against boost_unit_test_framework library git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@484 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/SConstruct b/SConstruct index 9870f20..8b1074e 100644 --- a/SConstruct +++ b/SConstruct @@ -126,7 +126,7 @@ if not env.GetOption('clean') and not os.path.exists("local_config.hh"): # created later are correct if not env.GetOption('clean') and not os.path.exists(".prepare-stamp") \ - and not os.environ.get("SCONS"): + and not os.environ.get("SCONS") and COMMAND_LINE_TARGETS != [ 'prepare' ]: env.Execute([ "scons prepare" ]) env.Clean('all', '.prepare-stamp') diff --git a/senfscons/BoostUnitTests.py b/senfscons/BoostUnitTests.py index 09d340a..3733455 100644 --- a/senfscons/BoostUnitTests.py +++ b/senfscons/BoostUnitTests.py @@ -34,7 +34,7 @@ def BoostUnitTests(env, target, objects, test_sources=None, LIBS = [], OBJECTS = else: test_sources = [] testEnv = env.Copy(**kw) - testEnv.Prepend(LIBS = '$BOOSTTESTLIB') + testEnv.Prepend(_LIBFLAGS = ' -Wl,-Bstatic -l$BOOSTTESTLIB -Wl,-Bdynamic ') testEnv.Prepend(LIBS = LIBS) all_objects = [] if not objects: diff --git a/senfscons/InstallIncludes.py b/senfscons/InstallIncludes.py index d6fc72e..754dfcc 100644 --- a/senfscons/InstallIncludes.py +++ b/senfscons/InstallIncludes.py @@ -7,6 +7,11 @@ # \ingroup builder import SCons.Builder, SCons.Action, SCons.Environment, SCons.Node.FS +try: + from SCons.Tool.install import installFunc, stringFunc +except: + installFunc = SCons.Environment.installFunc + stringFunc = SCons.Environment.installString def recursiveChildren(f): rv = {} @@ -45,11 +50,11 @@ class Installer: self.source = source def __call__(self, target, source, env): - SCons.Environment.installFunc([self.target], [self.source], env) + installFunc([self.target], [self.source], env) def generator(target, source, env, for_signature): return [ SCons.Action.Action( Installer(trg, src), - lambda a,b,c,s=SCons.Environment.installString([trg], [src], env):s ) + lambda a,b,c,s=stringFunc([trg], [src], env):s ) for trg, src in zip(target,source) ] InstallIncludes = SCons.Builder.Builder(emitter = emitter, diff --git a/senfscons/SENFSCons.py b/senfscons/SENFSCons.py index aa5efa2..a93bab6 100644 --- a/senfscons/SENFSCons.py +++ b/senfscons/SENFSCons.py @@ -148,9 +148,9 @@ def FinalizeBoost(env): if runtime: runtime = "-" + runtime env['BOOST_VARIANT'] = "-" + env['BOOST_TOOLSET'] + runtime - env['BOOSTTESTLIB'] = 'libboost_unit_test_framework' + env['BOOST_VARIANT'] - env['BOOSTREGEXLIB'] = 'libboost_regex' + env['BOOST_VARIANT'] - env['BOOSTFSLIB'] = 'libboost_filesystem' + env['BOOST_VARIANT'] + env['BOOSTTESTLIB'] = 'boost_unit_test_framework' + env['BOOST_VARIANT'] + env['BOOSTREGEXLIB'] = 'boost_regex' + env['BOOST_VARIANT'] + env['BOOSTFSLIB'] = 'boost_filesystem' + env['BOOST_VARIANT'] env.Append(LIBPATH = [ '$BOOST_LIBDIR' ], CPPPATH = [ '$BOOST_INCLUDES' ])