[CMake] cmakedefine based on find_package

Aaron Boxer boxerab at gmail.com
Thu Jul 27 09:39:10 EDT 2017


Never mind, figured it out :)

#cmakedefine OPENCL_FOUND

On Thu, Jul 27, 2017 at 9:23 AM, Aaron Boxer <boxerab at gmail.com> wrote:

> Hello,
>
> I am using find_package to find the OpenCL install on my system.
> Finding the package sets OPENCL_FOUND to true.
> I would like to create a #define in the code that will match this cmake
> variable,
> so I have set
>
> #cmakedefine HAVE_OPENCL @OPENCL_FOUND@
>
> in my config.h.cmake.in file.
>
> However, I get
>
> /* #undef HAVE_OPENCL */
>
> in the corresponding include file.
>
> Thanks,
> Aaron
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170727/743fae7a/attachment.html>


More information about the CMake mailing list