Boost logo

Boost :

From: Дмитрий Архипов (grisumbras_at_[hidden])
Date: 2024-05-22 15:27:29


ср, 22 мая 2024 г. в 12:27, Boris Kolpackov via Boost <boost_at_[hidden]>:
> BTW, can b2 do something like this:
>
> b2 host-toolset=gcc host-variant=release toolset=aarch64-linux-gnu-gcc variant=debug

The quick answer is "not exactly, and not out of the box".

The long answer follows.
As b2 is not a package manager, it doesn't have a special
understanding of build and target platforms. In b2 every target has
_some_ target platform implicitly defined by the sum of its
properties, and some of those properties also implicitly define the
build platform. So, there's no notion of build and target for the
entire target graph. But you can create a dedicated feature that sets
the properties of the build platform. To be clear, it's fairly
non-trivial to do, but see this:
https://gist.github.com/grisumbras/040b3b5ffc3572e395cbb3a8c9c11c09

If built with b2 host-platform=x86_64-linux-gnu-release variant=debug
target-os=windows toolset=gcc the preprocessor program (moxtool) is
built for the host (Linux), and the library is built for Windows.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk