[CMake] opencl and visual studio

Boxer, Aaron Aaron.Boxer at uhn.ca
Mon Jul 14 09:55:54 EDT 2014


Hello List,

I have a cmake project that I am adding opencl support to.
I am using the Intel OpenCL sdk, which integrates with Visual Studio.

So far, I do the following:


1)      I have a cmake script that finds the opencl libraries and include files

2)      I manually enable opencl support in visual studio in the Tools menu


With these steps, all opencl files are statically checked by the compiler. So far, so good.

However, to actually compile The files with opencl, I need to pass the absolute file path of the *.cl file into opencl. This is because, as is typical With cmake, the build files reside in a folder separate from the source files.

Has anyone encountered a similar problem? Is there a way of setting the *.cl folder path in cmake? Currently I have to
Hard code this into my code, which is hacky.

Also, it would be nice if cmake could automatically switch on opencl support in the visual studio project, but I have no idea how this could be done.

Thanks,
Aaron









This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. 
Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. 
If you have received this e-mail in error, please contact the sender and delete all copies. 
Opinions, conclusions or other information contained in this e-mail may not be that of the organization.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140714/87a54021/attachment-0001.html>


More information about the CMake mailing list