Boost logo

Boost-Build :

Subject: [Boost-build] Problems passing absolute paths to conditional as feature
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2009-07-15 03:31:11


Hi,

I'm working on a rule for using prebuilt libraries (not only boost
libraries) and have hit upon something. I'm using features to pass the
"base" name and the containing directory of the library to a conditional,
which generates the needed "<file>" property.

This seems to mostly work fine as long as I'm using relative paths for my
feature, but when using an absolute path the feature "disappears" and is not
passed along to the conditional rule. Please see attached Jamroot for a
demo.

Another thing is that I need to declare the feature as "incidental" in order
to have it passed, even when using relative paths. Why is this?

Results from a couple of runs with the sample Jamroot below.

Regards,
Johan

--------- Sample outputs -------
C:\users\jni\scratch\tests\boost.build\conditional>bjam
CONFIG: Using incidental in feature definition
CONFIG: Using path: sub/dir
...found 2 targets...

C:\users\jni\scratch\tests\boost.build\conditional>bjam --no-incidental
CONFIG: Not using incidental in feature definition
CONFIG: Using path: sub/dir
Jamroot:37: in
Jamfile</C:/users/jni/scratch/tests/boost.build/conditional>.bar from module
Jamfile</C:/users/jni/scratch/tests/boos
error: ERROR: bar-path is REALLY needed!!!
C:/users/jni/prj/dedsdk/deps/src/bbv2/kernel\modules.jam:66: in
modules.call-in from module Jamfile</C:/users/jni/scratch/tests/boos
[ ... snip ... ]
C:\users\jni\prj\dedsdk\deps\src\bbv2\boost-build.jam:8: in module scope
from module

C:\users\jni\scratch\tests\boost.build\conditional>bjam --path=.\
CONFIG: Using incidental in feature definition
CONFIG: Using path: .\
...found 2 targets...

C:\users\jni\scratch\tests\boost.build\conditional>bjam --path=C:\
CONFIG: Using incidental in feature definition
CONFIG: Using path: C:\
Jamroot:37: in
Jamfile</C:/users/jni/scratch/tests/boost.build/conditional>.bar from module
Jamfile</C:/users/jni/scratch/tests/boos
error: ERROR: bar-path is REALLY needed!!!
C:/users/jni/prj/dedsdk/deps/src/bbv2/kernel\modules.jam:66: in
modules.call-in from module Jamfile</C:/users/jni/scratch/tests/boos
[ ... snip ... ]
C:\users\jni\prj\dedsdk\deps\src\bbv2\boost-build.jam:8: in module scope
from module




Boost-Build 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