(This is a crossposting of http://stackoverflow.com/questions/30727588/disable-opencl-in-opencv-completely, which did not receive any replies by the time of asking this question)
I want to build a static version of OpenCV (3) with OpenCL disabled. To do so, I am using
cmake -D WITH_OPENCL=OFF -D BUILD_SHARED_LIBS=OFF
when compiling OpenCV, among other parameters (which disable other modules that I don't need). The output of the cmake call includes the following line
-- Use OpenCL: NO
which, if I understand it correctly, means that OpenCL is disabled.
Now, when linking against the compiled version of OpenCV, I get the following message (I redacted the path):
[Redacted]/lib/libopencv_core.a(ocl.cpp.o): In function `initOpenCLAndLoad': ocl.cpp:(.text.initOpenCLAndLoad+0x2b): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
I am aware of what the message means, but I am confused by its source - why is there OpenCL-invoking code in the compiled OpenCV library? Is there any other option that I need to set so that OpenCL is disabled completely?
Thank you and best regards