Boost logo

Boost-Build :

Subject: Re: [Boost-build] Specifying a somple C++ macro define in a jamfile
From: Jürgen Hunold (juergen.hunold_at_[hidden])
Date: 2011-03-27 11:54:52

Hi Erward,

On Sunday, 27. March 2011 17:39:38 Edward Diener wrote:
> How do I specify a simple macro definition, ie. #define SOMEMACRO, in a
> jamfile for the 'compile' rule ?

This should be documented at

> I know how to add a cxxflag, but
> specifying a command-line #define is different fro different compilers.

This would be the "define" feature which seems to be missing on the page above.

The usage is simple:


at the same place(s) you'd put <cxxflags> et. al

> Do I have to know the compiler flag for each compiler to do this or is
> their some feature of Boost Build which does it for me ?

or use some toolset specific values:


Hope this helps,



* Dipl.-Math. Jürgen Hunold       ! Ingenieurgesellschaft für 
* voice: ++49 511 262926 57       ! Verkehrs- und Eisenbahnwesen mbH  
* fax  : ++49 511 262926 99       ! Lister Straße 15
* juergen.hunold_at_[hidden]        !
* Geschäftsführer:                ! Sitz des Unternehmens: Hannover
* Prof. Dr.-Ing. Thomas Siefer    ! Amtsgericht Hannover, HRB 56965
* PD Dr.-Ing. Alfons Radtke       !

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