Boost logo

Boost :

Subject: Re: [boost] [Build] Test file name conflicts
From: Louis Dionne (ldionne.2_at_[hidden])
Date: 2015-10-09 17:17:43


Andrey Semashev-2 wrote
> On 09.10.2015 20:59, Louis Dionne wrote:
>> Hi,
>>
>> While trying to create Jamfiles for Boost.Hana's unit tests, the
>> following
>> situation came up. I have two unit tests in files
>>
>> foo/main.cpp
>> bar/main.cpp
>>
>> Then, my Jamfile.v2 contains the following:
>>
>> import testing ;
>>
>> test-suite xxx :
>> [ run foo/main.cpp ]
>> [ run bar/main.cpp ]
>> ;
>>
>> When I run `b2`, I get the following:
>>
>> error: No best alternative for ./main
>> next alternative: required properties: (empty)
>> matched
>> next alternative: required properties: (empty)
>> matched
>> error: No best alternative for ./main
>> next alternative: required properties: (empty)
>> matched
>> next alternative: required properties: (empty)
>> matched
>>
>> I think the problem is that Boost.Build tries to create two executables
>> named `main` in the same directory, which obviously causes a name
>> conflict.
>> Is there any way to avoid this, besides renaming the test files?
>
> I think you can mitigate that by providing names of the targets
> explicitly:
>
> test-suite xxx :
> [ run foo/main.cpp : : : : foo-main ]
> [ run bar/main.cpp : : : : bar-main ]
> ;
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost

Works like a charm, thanks!

--
View this message in context: http://boost.2283326.n4.nabble.com/Build-Test-file-name-conflicts-tp4680806p4680824.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk