Boost logo

Boost :

Subject: Re: [boost] CMake and Boost Build tests
From: Edward Diener (eldiener_at_[hidden])
Date: 2017-07-27 03:03:41

On 7/26/2017 4:48 PM, Roger Leigh via Boost wrote:
> On 26/07/17 21:28, Edward Diener via Boost wrote:
>> On 7/26/2017 3:33 PM, Robert Ramey via Boost wrote:
>>> On 7/26/17 11:49 AM, Edward Diener via Boost wrote:
>>> I couldn't make the compile-fail and run-fail targets to work so I
>>> just removed them from the cmake test suite. So if your thinking
>>> that CMake has a ways to go to be able to offer what we expect,
>>> you're right.
>> So you are saying that you cannot run a unit test with CMake that is
>> meant to show a failure. Wow, what a brilliant system !
> ctest itself treats a nonzero return as failure. It's pretty trivial to
> run a wrapper to invert the status for expected failures, and customise
> the test running in any way you see fit. See the EXPECT_FAIL lines in
> and the wrapper logic in
> as one way to do this.

That is just applicable to a run test. Current Boost Build also has
compile and link tests, although I will admit I have never found uses
for the link test. But in the compile test, only whether a compile is
successful or not is measured, while the run test does follow CTest
treating a nonzero return as failure. But is CTest really applicable as
a CMake alternative to Boost testing as it now exists under Boost Build
? The documentation for CTest does not explain what it actually does
amidst it enumeration of a trillion or so command line options, but why
should it do that, right ?

> Regards,
> Roger

Boost list run by bdawes at, gregod at, cpdaniel at, john at