Boost logo

Boost Testing :

Subject: Re: [Boost-testing] Disable test if not compiling with c++11
From: Raffi Enficiaud (raffi.enficiaud_at_[hidden])
Date: 2016-07-17 18:22:59


Le 17/07/16 à 01:11, Belcourt, Kenneth a écrit :
> Hi,
>
> This graph test case only compiles with c++11, otherwise fails with a compile error.
>
> [ run csr_graph_test.cpp : : : : : <variant>release ]
>
> Is there something like this to omit this test if not using c++11?
>
> [ run csr_graph_test.cpp : : : : : <variant>release <std>c++11 ]
>
> Or is there another way to accomplish this?
>
> Thanks.
>
> —- Noel

Hi,

This is not exactly what you are asking for, but might be useful: for
boost.test, I use the compiler capabilities/requirements instead:
- https://github.com/boostorg/test/blob/develop/test/Jamfile.v2
- https://github.com/boostorg/test/blob/develop/test/Jamfile.v2#L135

Creating composite requirements seem to work as well:
- https://github.com/boostorg/test/blob/develop/test/Jamfile.v2#L22
- https://github.com/boostorg/test/blob/develop/test/Jamfile.v2#L26

IMO it should work better that checking for c++11, especially for
VStudio (or "gcc c++0x" vs "gcc c++11").

Hope this helps,
Raffi


Boost-testing list run by mbergal at meta-comm.com