Subject: Re: [Boost-build] A few questions
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2015-03-12 15:03:09
On 03/12/2015 12:43 PM, Ryan Gonzalez wrote:
> I have a few questions about using Boost.Build. I know they sound kind of
> weird, but I can guarantee that I'm not trying to blow anything up. :)
> 1) Is it possible to run the command to compile a program on-the-spot, i.e.
> skip the meta-target phase for this particular target? This is the question
> I said would sound weird. See, I'm trying to run a "compile test"; if a
> source file compiles (and, in some cases, runs), then one thing is
> executed, otherwise another is executed.
Use the check-target-builds rule. See:
> 2) Is it possible to use two different toolsets in one proejct? I've
> encountered this problem in cross-compiling. Sometimes, you're trying to
> cross-compile a program. However, the program builds certain utilities that
> need to be executed during the build. Therefore, the stuff that's needed
> for the build needs to be compiled with the "host" C++ compiler, and the
> stuff that's going to be run on the target platform needs to compiled with
> the "target" C++ compiler.
Yes. Boost.Build is designed to work with
multiple toolsets. You'll need to explicitly
set target-os and the toolset for the code
that needs to run on the host.
> I'm trying to avoid using stuff like CMake because I'm not keen on macro
> languages. I don't like autotools, either (just read my signature).
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