|
Boost-Build : |
Subject: [Boost-build] Questions from a new user
From: JP Cimalando (jp-dev_at_[hidden])
Date: 2017-09-04 04:18:38
Hi,
I am a new user attempting a transition from CMake to Boost.Build,
and I want to ask some questions to which I couldn't find answers in
the manual.
Since switching I appreciate how this new build system is more rigorous
and how it offers a better freedom.
1. Cross-compilation.
Let's say I defined some toolsets in the project configuration.
using gcc : host : g++ : $(gcc_colors) ;
using gcc : mingw32 : i686-w64-mingw32-g++ : $(gcc_colors) ;
This allows me to build with either command "b2 toolset=gcc-host" or
"b2 toolset=gcc-mingw32 target-os=windows". However...
The first configuration incorrectly defines the build dir as
"bin/gcc-mingw-gnu-host". If I comment the second toolset, the build
dir goes back to normal "bin/gcc-gnu-host". As curious as this is, it
still seems to produce a correct build.
So what is this, a benign anomaly? do I do things the incorrect way?
Am I supposed to edit project-config.jam whenever I want to use the
other toolset?
2. I want my build to generate some sources using tools which are also
built as part of the project. These tools should be generated using the
host compiler to support cross compiling.
I solve this by making two separate projects, but is there a way to
integrate the two in a single build and make them properly dependent?
This is an example of what it looks like.
# Jamroot.jam
path-constant MY_TOOL : "tools/dist/my-tool" ;
actions my-tool {
$(MY_TOOL) $(>) > $(<)
}
# tools/Jamroot.jam
exe my-tool : "my-tool.cc" ;
install tools : my-tool : <location>"dist" ;
3. Is there already some facility to substitute text in *.in files, in
the same fashion as GNU's AC_SUBST or CMake's configure_file?
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