[Beignet] [PATCH] Add a CMake option for toggling OCL ICD Loader compatibility

Yang, Rong R rong.r.yang at intel.com
Tue Feb 7 08:07:06 UTC 2017


LGTM, pushed, thanks.

As Simon's suggestion, I think it is make sense to ask users to explicitly disable ICD if no ICD header, I will send a patch for it. 

> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Marek Szuba
> Sent: Wednesday, January 25, 2017 21:04
> To: beignet at lists.freedesktop.org
> Cc: Marek Szuba <Marek.Szuba at cern.ch>
> Subject: [Beignet] [PATCH] Add a CMake option for toggling OCL ICD Loader
> compatibility
> 
> The new option allows anyone wishing to do so to explicitly disable OCL ICD
> Loader support in Beignet, regardless of the presence or absence of OCL ICD
> header files. This is particularly useful for people building Beignet packages
> for distributions, as it avoids creating an implicit dependency on the state of
> the build host. The new option defaults to ON so the default behaviour of
> CMake configuration remains unchanged.
> 
> See also: https://bugs.freedesktop.org/show_bug.cgi?id=98885
> ---
>  CMakeLists.txt | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/CMakeLists.txt b/CMakeLists.txt index 59abc45..3246567 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -212,6 +212,8 @@ IF(ENABLE_GL_SHARING)
>    ENDIF(EGL_FOUND)
>  ENDIF(ENABLE_GL_SHARING)
> 
> +OPTION(OCLICD_COMPAT "OCL ICD compatibility mode" ON)
> +IF(OCLICD_COMPAT)
>  Find_Package(OCLIcd)
>  IF(OCLIcd_FOUND)
>    MESSAGE(STATUS "Looking for OCL ICD header file - found") @@ -223,6
> +225,7 @@ IF(OCLIcd_FOUND)
>  ELSE(OCLIcd_FOUND)
>    MESSAGE(STATUS "Looking for OCL ICD header file - not found")
>  ENDIF(OCLIcd_FOUND)
> +ENDIF(OCLICD_COMPAT)
> 
>  Find_Package(PythonInterp)
> 
> --
> 2.10.2
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list