Actually macro CV_OCL_RUN returns from function if the call succeeded. There is also check for _matD.isUMat() - if it is not then OpenCL branch will be skipped. If you compiled with -DWITH_OPENCL=OFF then these functions will be stripped completely.
So, if you build with -DWITH_LAPACK=ON cmake option and have MKL or some other Lapack backend available, then gemm should fall into that part.