Boost logo

Boost-Build :

From: eoin-keyword-boost.jam.dca6c0_at_[hidden]
Date: 2006-01-13 20:46:15


Hello, I am using Boost.Build v2 to manage pretty much most of my build
environment however I cannot figure out how to get header only libraries
to work. An example of what I’m doing will explain better;

I made a jamfile for TinyXML like this (edited to keep size down);

project TinyXMLSTL

: requirements

<include>./
<define>TIXML_USE_STL


: usage-requirements

<include>./
<define>TIXML_USE_STL
;

lib "TinyXMLSTL"
:
tinystr.cpp

tinyxmlparser.cpp
;

The I use a Jamroot file to create an alias;

use-project /TinyXMLSTL : Libraries/tinyxml ;

And then any project that uses TinyXML simple puts something like the
following in its requirements;

<library>/TinyXMLSTL//TinyXMLSTL/<link>static

The problem is I don’t know what I’m supposed to do for header only
libraries as there is no lib target. I’ve tried many different things but
the usage-requirements for header only libraries never get included.

Interestingly this page
(http://boost.sourceforge.net/boost-build2/doc/html/bbv2/advanced/jamfiles.html)
 towards the middle gives this example;

lib helpers : helpers.hpp ; # a header-only library
alias helpers : helpers.lib : <toolset>msvc ; # except on msvc

However whenever I tried creating a lib target with only header files I
get this error;
G:/Dev/Libraries/Boost/boost_1_33_1/tools/build/v2/build\targets.jam:1245:
 in construct from module object(typed-target)@5
error: unable to construct [library name here]

The CVS boost doesn’t help solve the problem. As a work around I created
an empty dummy.cpp file and used it in the target lib sources. It works,
but its crude.

Sorry for the long email,
Kind regards, Eoin.


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk