$include_dir="/home/hyper-archives/boost-build/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-build] An option to prepend paths to %PATH% before executing a test built with a toolset
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2015-10-19 18:47:13
Hi,
Forgive me if this was previously solved, I couldn't find anything about
this in the archives.
I'm trying to setup several mingw targets for my regression tests. I'd
like to run several mingw installations (each one with a different
compiler and runtime DLLs) in a single b2 invocation (apart from
simplifying things, it maximizes CPU as it parallelizes all toolsets
automatically).
In the different Mingw installations, I need to adjust the path before
executing a test, as the DLLs needed for each toolset reside in
different directories.
I've tried to modify "testing.jam" where the rule "run-path-setup" seems
to do something similar with an option named "dll-path". However, I
could not figure out how to pass a "compiler option" setting from a
toolset to the "properties *" variable in rule "run-path-setup".
The basic idea is:
1) Define in a toolset, a path to be searched for DLLs before executing
an executable compiled with that toolset:
using gcc : 4.3 : : <run-dll-paths>"C:/Programs/mingw-gcc-4.3/bin" ;
2) Propagate that option into the $(properties) passed to
"capture-output" and similar rules
3) Obtain that path in "run-path-setup":
local run-dll-paths = [ feature.get-values <run-dll-paths> :
$(properties) ] ;
4) Prepend it to PATH_SETUP
I've tried to hack it myself trying to imitate other rules, but after a
couple of hours I just gave up with. Any similar feature that I might be
missing? Any hint on how this can be implemented (I really know very
little about Boost.Build)? Is this feature useful enough to add it to
Boost.Build?
Best,
Ion