Boost logo

Boost-Build :

Subject: [Boost-build] [run] parameter containing the build directory
From: Raffi Enficiaud (raffi.enficiaud_at_[hidden])
Date: 2016-10-10 04:44:49


Hi again :)

I would like to have a simple rule

"""
run smoke-ts-static : --log_sink=smoke-ts-sink.xml --log_format=XML : :
: some-target-name-0
"""

but I would like the output file "smoke-ts-sink.xml" to be located in
the same directory containing the other outputs (.output, .run and .test) .

There is a build-dir property

http://www.boost.org/doc/libs/1_62_0/doc/html/bbv2/reference.html#bbv2.reference.class.project-target.build-dir

but I have two questions related to that:

1. How do I use it? :)

I declare things like this
to-return =
       [ exe smoke-ts-static : smoke-ts/basic-smoke-test.cpp
../build//boost_unit_test_framework/<link>static ]
       [ run smoke-ts-static : --log_sink=smoke-ts-sink.$(logger)
--log_format=$(logger) : : : $(test-name-prefix)-2 ]

but then, when I do
    ECHO $(test-name-prefix)-2 ;
    ECHO $($(test-name-prefix)-2).name ;
    ECHO $($(test-name-prefix)-2).build-dir ;
    #ECHO $(test-name-prefix)-2.build-dir ( ) ;

I have nothing except for the $(test-name-prefix)-2 giving the right value.

2. is it possible to have those properties on the same declaration as
the target itself? Something like
run smoke-ts-static :
--log_sink=$(some-target-name-0).build-dir/smoke-ts-sink.xml
--log_format=XML : : : some-target-name-0

or "$(some-target-name-0).build-dir" is expanded at the calling point
and yields to an undefined value?

Thanks!
Raffi


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