cmakedefine based on find_package

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

cmakedefine based on find_package

Aaron Boxer
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



--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cmakedefine based on find_package

Aaron Boxer
Never mind, figured it out :)

#cmakedefine OPENCL_FOUND

On Thu, Jul 27, 2017 at 9:23 AM, Aaron Boxer <[hidden email]> 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




--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Loading...