|
Boost-Build : |
Subject: [Boost-build] Creating a top-level property that expands differently for subprojects
From: Gregory Symons (gsymons_at_[hidden])
Date: 2011-01-13 12:37:54
Hi,
I have a project set up with several subprojects. I'm using Google Test
for unit testing, and have set up unit-test targets in each subproject
similar to the following:
path-constant root-path : . ;
unit-test test_util : [ glob *_test.cpp ] libs gtest_main :
<testing.arg>"--gtest_output=xml:"root-path/test_detail.xml ;
What I'd like to do is specify the testing.arg property as a requirement
on the root project, but have it expand to something unique for each
subproject.
Something along the lines of:
project root : requirements
<testing.arg>"--gtest_output=xml:"$(subproject_dir)/test_detail.xml ;
where $(subproject-dir) is expanded to the directory or project id for
each subproject in turn; i.e. when building the util subproject it
expands to "util", and when building the common subproject it expands to
"common". Is there a way to do this? I can't quite seem to find it in
the docs, and I'm afraid I don't grok boost.build enough to even guess
at what the shape of the right answer is.
Thanks for any help you can give me,
-- Gregory Symons <gsymons_at_[hidden]> Developer DrillingInfo <http://www.drillinginfo.com>
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