ocl: print missing error message only if OPENCV_OPENCL_RUNTIME is used
This commit is contained in:
@@ -70,6 +70,7 @@ static void* AppleCLGetProcAddress(const char* name)
|
|||||||
handle = dlopen(oclpath, RTLD_LAZY | RTLD_GLOBAL);
|
handle = dlopen(oclpath, RTLD_LAZY | RTLD_GLOBAL);
|
||||||
if (handle == NULL)
|
if (handle == NULL)
|
||||||
{
|
{
|
||||||
|
if (envPath)
|
||||||
fprintf(stderr, ERROR_MSG_CANT_LOAD);
|
fprintf(stderr, ERROR_MSG_CANT_LOAD);
|
||||||
}
|
}
|
||||||
else if (dlsym(handle, OPENCL_FUNC_TO_CHECK_1_1) == NULL)
|
else if (dlsym(handle, OPENCL_FUNC_TO_CHECK_1_1) == NULL)
|
||||||
@@ -108,6 +109,7 @@ static void* WinGetProcAddress(const char* name)
|
|||||||
handle = LoadLibraryA(path);
|
handle = LoadLibraryA(path);
|
||||||
if (!handle)
|
if (!handle)
|
||||||
{
|
{
|
||||||
|
if (envPath)
|
||||||
fprintf(stderr, ERROR_MSG_CANT_LOAD);
|
fprintf(stderr, ERROR_MSG_CANT_LOAD);
|
||||||
}
|
}
|
||||||
else if (GetProcAddress(handle, OPENCL_FUNC_TO_CHECK_1_1) == NULL)
|
else if (GetProcAddress(handle, OPENCL_FUNC_TO_CHECK_1_1) == NULL)
|
||||||
@@ -145,6 +147,7 @@ static void* GetProcAddress(const char* name)
|
|||||||
handle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL);
|
handle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL);
|
||||||
if (handle == NULL)
|
if (handle == NULL)
|
||||||
{
|
{
|
||||||
|
if (envPath)
|
||||||
fprintf(stderr, ERROR_MSG_CANT_LOAD);
|
fprintf(stderr, ERROR_MSG_CANT_LOAD);
|
||||||
}
|
}
|
||||||
else if (dlsym(handle, OPENCL_FUNC_TO_CHECK_1_1) == NULL)
|
else if (dlsym(handle, OPENCL_FUNC_TO_CHECK_1_1) == NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user