For macOS, copying cl2.hpp from https://github.com/KhronosGroup/OpenCL-CLHPP/releases to /usr/local/include/CL works.

Setting USE_OPENCL=OFF also works to disable OpenCL.

One or the other is necessary or macOS will try the use the v1.2 C headers provided by Apple and pointed to by OpenCL_INCLUDE_DIR.

After lanuching QGIS, I see the Options|Acceleration panel with three choices:
Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz
HD Graphics 4000
GeForce GT 650M

To automate the mac build, my suggestion is to create a OpenCL_HPP_INCLUDE_DIR variable. If a mac user sets it, use OpenCL; if not, don't use OpenCL. For other platforms, OpenCL_HPP_INCLUDE_DIR is automatically set to OpenCL_INCLUDE_DIR.

Tom

_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to