Boost logo

Boost-Build :

Subject: Re: [Boost-build] Detect if OpenCL is available.
From: John Maddock (jz.maddock_at_[hidden])
Date: 2015-05-12 15:00:32


> Could someone help with the following issue for running the
> Boost.Compute unit tests? Seems like something that Boost.Build's
> configure mechanism should be able to handle.
>
> From: https://github.com/boostorg/boost/pull/79
>

You need a short config program that only compiles and links when OpenCL
is available, see for example:
https://github.com/boostorg/multiprecision/blob/master/config/Jamfile.v2

Then lets say the config target is called "has_opencl" you would add:

[ check-target-builds ../config//has_opencl : : <build>no ]

To the requirements for the tests that need this.

HTH, John.


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