Boost logo

Boost-Build :

Subject: Re: [Boost-build] Custom generator problem
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2009-11-20 08:39:11


Ping?

Johan Nilsson wrote:
>> Hi,
>>
>> I've been working on a custom generator for some time now, and have
>> it
>> mostly working now, with one annoying problem. It appears that using
>> the
>> alias rule on a target generated with my generator triggers a
>> "Duplicate
>> name of actual target" error.
>>
>> The generator is a custom test execution generator; in the spirit of
>> the
>> built-in unit-test rule a specially named file is created if all
>> tests
>> passed, which is used as a marker to determine if the test results
>> are
>> up-to-date and ok.
>>
>> The generator basically does this:
>>
>> - Accepts a shared library, the "test library", as source (contains
>> unit
>> tests)
>> - Copies the test library to the output directory
>> - Copies all run-time dependencies (shared libs, basically) of the
>> test
>> library to the output directory before running the tests
>> - Runs the test runner, passing the name of the test library on the
>> command-line
>> - NOTE: It is not possible to simply extend PATH before running the
>> tests,
>> as is done in testing.jam.
>>
>> Optionally:
>>
>> - Generates XML output from the test runner to a file in the target
>> directory
>> - Copies the generated XML output files (tagged with <variant>) to a
>> common
>> output directory
>>
>> All this seems to work fine, even when running a multi-variant build
>> (e.g.
>> bjam debug release). But - if I alias the test target when
>> generating XML I
>> get the above error, even if only running a single-variant build.
>>
>> I've been trying to reduce the code to the simplest reproducible
>> test case, attached as a .zip archive. I'd be very grateful if
>> someone could take a
>> look at the problem as I'm pretty much stumped at this point. (This
>> is not
>> the real generator, as you can see by the file types.)
>>
>> To see the problem, unzip the archive and remove the comment before
>> the
>> alias rule in jamroot.jam. NOTE: The attached project probably only
>> works
>> under Windows, but with minor modifications it should run under *nix
>> as
>> well. The contained .dlls are just dummy text files.
>>
>> Thanks / Johan
>>
>
>
>
>> _______________________________________________
>> Unsubscribe & other changes:
>> http://lists.boost.org/mailman/listinfo.cgi/boost-build


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