Boost logo

Boost-Build :

From: emildotchevski (emildotchevski_at_[hidden])
Date: 2005-08-04 16:00:57


> rule simple-lib ( lib-name )
> {
> lib $(lib-name) : [ glob *.cpp ] [ glob $(OS)/*.cpp ;
> }

I tried putting the above in project-root.jam, but i get this error:

project.jam:321 in load-jamfile from module project
error: The value of the .current-project variable
error: has magically changed after loading a Jamfile.
error: This means some of the targets might be defined a the wrong
project.

If I put the simple-lib rule in the Jamfile of the lib that invokes
it, then it works fine.

I tried to resolve this issue myself and I think few days ago I did
read something relevant in the docs but now somehow I can't find it.

And finally another question, I know the FAQ explains how to set
compiler flags per cpp file, however what I need is a bit more
complicated. I want a lib to glob for *.cpp and use common options
for all of them except for a few files which I need to NOT use a
compiler flag that all other cpp files use (in the particular case I
am addressing at the moment, I want to force ANSI conformance for all
cpp files except for the very few that happen to #include
<windows.h>).

Once again thanks a lot, you've been very helpful!
Emil

 


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