Boost logo

Boost-Build :

Subject: [Boost-build] Compiling dozens of files called main.cpp
From: Boris Schaeling (boris_at_[hidden])
Date: 2010-01-18 15:40:18


I'm trying to compile dozens of files in countless subdirectories. I came
up with this simple Jamroot file as all files are called main.cpp:

import testing ;
compile [ glob-tree main.cpp ] ;

Bjam doesn't like this though and shows the error "Duplicate name of
actual target". There is an entry in the FAQ at
http://www.boost.org/doc/libs/1_41_0/doc/html/bbv2/faq.html#id2181242 but
as far as I can tell the problem is different here: I'm not trying to
compile the same file twice but many different files in different
subdirectories - but all files happen to be called main.cpp (as they are
stand-alone programs). As Bjam wants to compile all files in bin/main.test
though the error pops up. I wonder if there is a work-around to trick Bjam
(as the above Jamroot file would be really simple; ideally I don't want to
drop the glob-tree rule and don't want to put a Jamfile into each and
every subdirectory)?

Boris


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