Skip to content
Snippets Groups Projects
Commit 2845105f authored by g0dil's avatar g0dil
Browse files

Link statically against boost_unit_test_framework library

parent f0b3a732
No related branches found
No related tags found
No related merge requests found
...@@ -126,7 +126,7 @@ if not env.GetOption('clean') and not os.path.exists("local_config.hh"): ...@@ -126,7 +126,7 @@ if not env.GetOption('clean') and not os.path.exists("local_config.hh"):
# created later are correct # created later are correct
if not env.GetOption('clean') and not os.path.exists(".prepare-stamp") \ 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.Execute([ "scons prepare" ])
env.Clean('all', '.prepare-stamp') env.Clean('all', '.prepare-stamp')
......
...@@ -34,7 +34,7 @@ def BoostUnitTests(env, target, objects, test_sources=None, LIBS = [], OBJECTS = ...@@ -34,7 +34,7 @@ def BoostUnitTests(env, target, objects, test_sources=None, LIBS = [], OBJECTS =
else: else:
test_sources = [] test_sources = []
testEnv = env.Copy(**kw) testEnv = env.Copy(**kw)
testEnv.Prepend(LIBS = '$BOOSTTESTLIB') testEnv.Prepend(_LIBFLAGS = ' -Wl,-Bstatic -l$BOOSTTESTLIB -Wl,-Bdynamic ')
testEnv.Prepend(LIBS = LIBS) testEnv.Prepend(LIBS = LIBS)
all_objects = [] all_objects = []
if not objects: if not objects:
......
...@@ -7,6 +7,11 @@ ...@@ -7,6 +7,11 @@
# \ingroup builder # \ingroup builder
import SCons.Builder, SCons.Action, SCons.Environment, SCons.Node.FS 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): def recursiveChildren(f):
rv = {} rv = {}
...@@ -45,11 +50,11 @@ class Installer: ...@@ -45,11 +50,11 @@ class Installer:
self.source = source self.source = source
def __call__(self, target, source, env): 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): def generator(target, source, env, for_signature):
return [ SCons.Action.Action( Installer(trg, src), 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) ] for trg, src in zip(target,source) ]
InstallIncludes = SCons.Builder.Builder(emitter = emitter, InstallIncludes = SCons.Builder.Builder(emitter = emitter,
......
...@@ -148,9 +148,9 @@ def FinalizeBoost(env): ...@@ -148,9 +148,9 @@ def FinalizeBoost(env):
if runtime: runtime = "-" + runtime if runtime: runtime = "-" + runtime
env['BOOST_VARIANT'] = "-" + env['BOOST_TOOLSET'] + runtime env['BOOST_VARIANT'] = "-" + env['BOOST_TOOLSET'] + runtime
env['BOOSTTESTLIB'] = 'libboost_unit_test_framework' + env['BOOST_VARIANT'] env['BOOSTTESTLIB'] = 'boost_unit_test_framework' + env['BOOST_VARIANT']
env['BOOSTREGEXLIB'] = 'libboost_regex' + env['BOOST_VARIANT'] env['BOOSTREGEXLIB'] = 'boost_regex' + env['BOOST_VARIANT']
env['BOOSTFSLIB'] = 'libboost_filesystem' + env['BOOST_VARIANT'] env['BOOSTFSLIB'] = 'boost_filesystem' + env['BOOST_VARIANT']
env.Append(LIBPATH = [ '$BOOST_LIBDIR' ], env.Append(LIBPATH = [ '$BOOST_LIBDIR' ],
CPPPATH = [ '$BOOST_INCLUDES' ]) CPPPATH = [ '$BOOST_INCLUDES' ])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment