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/test/unused/project-root.jam


import type ;
import generators ;
import print ;
import virtual-target ;
import "class" : new ;
import modules ;
import targets ;


type.register X : x ;

class test-target-class : basic-target
{
    rule __init__ ( name : project )
    {
        basic-target.__init__ $(name) : $(project) ;
    }
        
    rule construct ( source-targets * : property-set )
    {
        if [ modules.peek : GENERATE_NOTHING ]
        {
            return ;
        }
        else if [ modules.peek : GENERATE_ONLY_UNUSABLE ] 
        {
            return [ virtual-target.from-file b.x : $(self.project) ] 
              ;             
        }
        else
        {            
            return [ virtual-target.from-file b.x : $(self.project) ] 
              [ virtual-target.from-file b.cpp : $(self.project) ] 
                ; 
        }        
    }
    
    rule compute-usage-requirements ( rproperties : targets * )
    {
        return [ property-set.create <define>FOO ] ;
    }
}

rule make-b-main-target
{
    local project = [ CALLER_MODULE ] ;    
    
    targets.main-target-alternative 
      [ new test-target-class b : $(project) ] ;
}

IMPORT $(__name__) : make-b-main-target : : make-b-main-target ;