Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52761 - in sandbox/SCons: libs libs/filesystem/test tools/scons
From: loonycyborg_at_[hidden]
Date: 2009-05-04 18:42:15


Author: loonycyborg
Date: 2009-05-04 18:42:15 EDT (Mon, 04 May 2009)
New Revision: 52761
URL: http://svn.boost.org/trac/boost/changeset/52761

Log:
Use RPATH when linking regression tests.

Text files modified:
   sandbox/SCons/libs/SConscript | 4 +++-
   sandbox/SCons/libs/filesystem/test/SConscript | 1 -
   sandbox/SCons/tools/scons/boost-libs.py | 4 +++-
   3 files changed, 6 insertions(+), 3 deletions(-)

Modified: sandbox/SCons/libs/SConscript
==============================================================================
--- sandbox/SCons/libs/SConscript (original)
+++ sandbox/SCons/libs/SConscript 2009-05-04 18:42:15 EDT (Mon, 04 May 2009)
@@ -35,4 +35,6 @@
             if GetOption("test"):
                 for sconscript in test_sconscripts:
                     lib = str(sconscript.get_dir().up())
- env.SConscript("$BOOST_CURRENT_VARIANT_DIR/" + lib + "/test/SConscript", exports = { "env" : env.Clone(BOOST_LIB = lib.upper()) })
+ test_env = env.Clone(BOOST_LIB = lib.upper(), BOOST_TEST = True)
+ test_env.BoostUseLib(lib)
+ env.SConscript("$BOOST_CURRENT_VARIANT_DIR/" + lib + "/test/SConscript", exports = { "env" : test_env })

Modified: sandbox/SCons/libs/filesystem/test/SConscript
==============================================================================
--- sandbox/SCons/libs/filesystem/test/SConscript (original)
+++ sandbox/SCons/libs/filesystem/test/SConscript 2009-05-04 18:42:15 EDT (Mon, 04 May 2009)
@@ -1,6 +1,5 @@
 # vi: syntax=python:et:ts=4
 Import("env")
 
-env.BoostUseLib("filesystem")
 env.BoostUseLib("system")
 Alias("test", env.Program("path_test.cpp"))

Modified: sandbox/SCons/tools/scons/boost-libs.py
==============================================================================
--- sandbox/SCons/tools/scons/boost-libs.py (original)
+++ sandbox/SCons/tools/scons/boost-libs.py 2009-05-04 18:42:15 EDT (Mon, 04 May 2009)
@@ -18,9 +18,11 @@
 
 def BoostUseLib(env, lib):
     env.AppendUnique(
- LIBPATH = ["$BOOST_CURRENT_VARIANT_DIR/" + lib + "/src"],
+ LIBPATH = [env.Dir("$BOOST_CURRENT_VARIANT_DIR/" + lib + "/src")],
         LIBS = ["boost_" + lib + env["BOOST_SUFFIX"]]
     )
+ if env.get("BOOST_TEST"):
+ env.AppendUnique(RPATH = [env.Dir("$BOOST_CURRENT_VARIANT_DIR/" + lib + "/src")])
 
 def PythonExtension(env, lib, sources, **kw):
     if env["LINK_DYNAMIC"]:


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk