Question: Incremental builds for multiple build configurations side-by-side

Hello, this is not a bug, but a beginner's question.

I would like to work in a workspace, editing code which has to run on multiple architectures. There are builds working with eg: bst --option arch amd64 build mypackage.bst.

Until now (without bst) we had a CMake build directory with subdirectories for each architecture: build/mipsel or build/ppc. Each of these were configured seperately with CMake -D... --CMAKE_TOOLCHAIN_FILE=... ../.. -GNinja. For the build we just had to change to the respective builddir and issue: ninja all. This was convenient, since it allows incremental builds seperately for each architecture, using the same source.

How can I emulate this using workspaces in bst?

I have tried:

  • Dumbly just building with the different arch option: ``bst --option arch i368 build mypackage.bst```. This works, but completely rebuilds and reconfigures the current _builddir. So no incremental builds.
  • I've created a condition in mypackage.bst (kind: cmake) and set a different builddir dependent on the arch value (arch=i386:_builddir_i386, arch=amd64:_builddir_amd64). This does not work. When I change the arch option for the build to another value (eg. from i386 to amd64), bst only wants to issue: cmake --build _builddir_amd64. This cannot work, because the previous run only configured _builddir_i386 but not _builddir_amd64. So this won't be a solution.

Are there any other possibilities I could try?

How do others work efficiently with bst if they support multiple architectures? Is this scenario even supported by bst yet?

Thanks for any answers and help, regards Marc

Edited by mbodmer