Boost logo

Boost-Build :

Subject: Re: [Boost-build] feature detection
From: alainm (alain.miniussi_at_[hidden])
Date: 2016-10-25 05:14:54


Thanks Vladimir,

The example works, I'll try to adapt it to my situation.

Cheers

Alain

On 25/10/2016 10:56, Vladimir Prus wrote:
> Hi Alain,
>
> On 25-Oct-16 11:19 AM, alainm wrote:
>> Hi,
>>
>> Assuming I found the b2 documentation
>> (http://www.boost.org/build/doc/html/) I did not find how to implement
>> automatic feature detection.
>> What I need is something like CMake's check_function_exists or
>> try_compile and, based on the answer, be able to set a macro definition.
>>
>> Right now, it seems that stuff like BOOST_NO_CXX11_DELETED_FUNCTIONS is
>> defined manually in MPI.config header files which is not really a real
>> world option.
>
> You're right that finding this in documentation is harder than it
> should be. Before we get to redo docs, I've put together an example,
> here:
>
> https://github.com/boostorg/build/tree/develop/example/try_compile
>
> It sets a macro based on compilability of a C++ source file, which seems
> like what you're after. Could you give it a try?
>
> Thanks,
>

-- 
Alain Miniussi
Pole Génie Logiciel Scientifique
Observatoire de la Côte d'Azur
Blv de l'Observatoire, Nice

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk