Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.

tools/build/v2/example/make/gcc.jam


import property ;

rule compile ( target : sources * : property-set * )
{
    local options ;
    for local p in $(property-set)
    {
        if $(p) = <optimization>on 
        {
            options += -O2 ;
        }
        else if $(p) = <debug-symbols>on 
        {
            options += -g ;
        }
        else if $(p:G) = <define>
        {
            options += -D$(p:G=) ;
        }        
    }
    OPTIONS on $(target) = $(options) ;
}

actions compile
{
    g++ $(OPTIONS) -c -o $(<) $(>) 
}

rule link ( target : sources * : property-set * )
{
    local options ;
    if <debug-symbols>on in $(property-set)
    {
        options += -g ;
    }
    OPTIONS on $(target) = $(options) ;
}

actions link
{
    g++ $(OPTIONS) -o $(<) $(>)
}