Boost logo

Boost :

Subject: Re: [boost] [Config] Macros for the absence of a full C++11 <memory> implementation
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2014-02-16 13:46:49


AMDG

On 02/11/2014 08:59 AM, John Maddock wrote:
>> This is a problem because the expectation for this file is to fail
>> compilation when the macro ought to be set. However, it sometimes fails
>> compilation (when std::addressof is not present at all), and sometimes
>> fails at runtime (when std::addressof is present but doesn't pass the
>> test, as in VC++12).
>>
>> And we don't have a rule for that. compile-fail always wants it to fail
>> compilation; run-fail always wants it to compile/link and only then
>> fail. I don't know how one can express "this test should fail at compile
>> time or at run time" in Boost.Build.
>
> No there are several tests that don't work quite right because there's
> no opposite to "run" in Boost.Build.
>

I'd be happy to implement such a rule if
anyone can figure out how to represent it
in the dependency graph.

What we have for run-fail looks somethings like this:

DEPENDS x.obj : x.cpp ;
msvc.compile.c++ x.obj : x.cpp ;
DEPENDS x.exe : x.obj ;
msvc.link x.exe : x.obj ;
DEPENDS x.run : x.exe ;
testing.capture-output : x.run : x.exe ;
FAIL_EXPECTED x.run ;

What we would need is a way to say
that we expect x.obj OR x.exe OR x.run
to fail.

We could say that x.run passes iff
testing.capture-output is skipped
because a dependency failed or has
non-zero exit status. But... this
will make a mess of the total pass/fail
counts and will fail badly with -q,
not to mention that it will cause the
test to pass if a library dependency
fails to build.

In Christ,
Steven Watanabe


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