[CMake] cmakedefine based on find_package

Aaron Boxer boxerab at gmail.com
Thu Jul 27 09:23:15 EDT 2017


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/84e0e754/attachment.html>


More information about the CMake mailing list