|
Boost : |
Subject: Re: [boost] [Build] Test file name conflicts
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-10-09 14:19:19
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 ]
;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk