Boost logo

Boost-Build :

Subject: [Boost-build] Handling libraries that are built with external build systems
From: Christian Aichinger (caichinger_at_[hidden])
Date: 2016-06-07 09:06:00

In a project that uses Boost Build, is there an easy way to have library sub-projects that use other build systems (e.g. CMake)? The resulting .a/.so files should be used by bjam.

  ./ext/external-lib/ # built using cmake
  ./lib/internal-lib/ # internal library using bjam
  ./src/ # application code, using both libs

I tried creating ext/external-lib/Jamfile with the following code:

    notfile build_extlib : @build_extlib ;
    actions build_extlib
        # ... build instructions ...
        touch libextlib.a

    lib extlib : :
        : :

I can then run `bjam ext/external-lib//build_extlib` and use `ext/external-lib//extlib` as library in other targets. However, the build process does not happen automatically. Adding build_extlib as dependency to extlib didn't work, bjam complained about the missing libextlib.a (the build product of build_extlib). I tried using implicit-dependency, but that didn't work either (build_extlib was never executed).

What's the best solution to this problem? Converting extlib to Bjam is not an option, it's a rather involved build system.


UBIMET GmbH - weather matters 
Christian Aichinger • IT 
A-1220 Wien • Donau-City-Straße 11 • Tel +43 1 263 11 22 • Fax +43 1 263 11 22 219 
caichinger_at_[hidden] • 

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at