[Piglit] [PATCH] Modify the FindOpenCL.make to add the CL lib name

Tom Stellard tom at stellard.net
Wed May 15 10:44:10 PDT 2013


On Wed, May 15, 2013 at 02:57:53PM +0800, junyan.he at linux.intel.com wrote:
> From: Junyan He <junyan.he at linux.intel.com>
> 
> Some OpenCL lib's name is not libOpenCL.so.
> Some thing like libCL.so, libcl.so may exist,
> and in these cases the check failed.
> Add the names to fix this problem.
> 
> Signed-off-by: Junyan He <junyan.he at linux.intel.com>
> ---
>  cmake/Modules/FindOpenCL.cmake |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/cmake/Modules/FindOpenCL.cmake b/cmake/Modules/FindOpenCL.cmake
> index cc66714..121dcf2 100644
> --- a/cmake/Modules/FindOpenCL.cmake
> +++ b/cmake/Modules/FindOpenCL.cmake
> @@ -35,7 +35,8 @@
>      find_path(OPENCL_INCLUDE_PATH CL/opencl.h)
>    endif()
>  
> -  find_library(OPENCL_opencl_LIBRARY OpenCL)
> +  find_library(OPENCL_opencl_LIBRARY
> +      NAMES OpenCL CL cl)
>

Which OpenCL implementations create libCL.so or libcl.so ?  Is the
purpose of this to test implementations without going through the ICD
loader?

I don't know much about CMake, but this patch is OK with me as long as
it doesn't break the current behavior.

-Tom
>  include(FindPackageHandleStandardArgs)
>  FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenCL
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list