Boost logo

Boost-Build :

Subject: Re: [Boost-build] Building OpenMP targets
From: Juraj Ivanèiæ (juraj.ivancic_at_[hidden])
Date: 2013-08-05 08:39:26

On 3.8.2013. 2:41, Pascal Germroth wrote:

> To prevent building the example on clang I could use
> exe example : example.cpp : <toolset>gcc ;
> exe example : example.cpp : <toolset>intel ;

You could also use

     exe example : example.cpp : <toolset>clang:<build>no ;

> Is there a way to define/use OpenMP as a feature, so that my Jamfile
> wouldn't need to name every toolset but could just require OpenMP for a
> target, which would magically set the flag on a supporting compiler or
> ignore the target on an unsupported compiler? So that I could write:

Try this:

     import feature ;
     feature.feature openmp : yes : optional composite propagated ;

     feature.compose <openmp>yes :
         <toolset>msvc: ...

     project : requirements ... ;
     exe example : example.cpp : <openmp>yes ;

> Supporting OpenMP in the global toolset definitions could benefit other
> projects, too, would this be hard to implement? Where could I look for a
> starting point?

If you want to add a support module for openmp have a look at how
jamfiles in the contrib directory are implemented.

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