[Beignet] [Patch V2] cmake: add option OCL_ICD_INSTALL_PREFIX to set icd file install path.
Song, Ruiling
ruiling.song at intel.com
Wed Jul 26 02:04:37 UTC 2017
Looks good.
Ruiling
> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Yang Rong
> Sent: Wednesday, April 26, 2017 2:04 PM
> To: beignet at lists.freedesktop.org
> Cc: Yang, Rong R <rong.r.yang at intel.com>
> Subject: [Beignet] [Patch V2] cmake: add option OCL_ICD_INSTALL_PREFIX to
> set icd file install path.
>
> It is for the user who don't has root permission.
>
> V2: change to option name to OCL_ICD_INSTALL_PREFIX.
> Signed-off-by: Yang Rong <rong.r.yang at intel.com>
> ---
> CMakeLists.txt | 27 +++++++++++++++------------
> 1 file changed, 15 insertions(+), 12 deletions(-)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 7e01688..71e3ef7 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -211,18 +211,21 @@ ENDIF(EGL_FOUND)
>
> 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")
> - configure_file (
> - "intel-beignet.icd.in"
> - "${ICD_FILE_NAME}"
> - )
> - install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME}
> DESTINATION /etc/OpenCL/vendors)
> -ELSE(OCLIcd_FOUND)
> - MESSAGE(STATUS "Looking for OCL ICD header file - not found")
> - MESSAGE(FATAL_ERROR "OCL ICD loader miss. If you really want to disable
> OCL ICD support, please run cmake with option -DOCLICD_COMPAT=0.")
> -ENDIF(OCLIcd_FOUND)
> + Find_Package(OCLIcd)
> + IF(OCLIcd_FOUND)
> + MESSAGE(STATUS "Looking for OCL ICD header file - found")
> + configure_file (
> + "intel-beignet.icd.in"
> + "${ICD_FILE_NAME}"
> + )
> + IF(NOT OCL_ICD_INSTALL_PREFIX)
> + set(OCL_ICD_INSTALL_PREFIX "/etc/OpenCL/vendors")
> + ENDIF(NOT OCL_ICD_INSTALL_PREFIX)
> + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME}
> DESTINATION ${OCL_ICD_INSTALL_PREFIX})
> + ELSE(OCLIcd_FOUND)
> + MESSAGE(STATUS "Looking for OCL ICD header file - not found")
> + MESSAGE(FATAL_ERROR "OCL ICD loader miss. If you really want to disable
> OCL ICD support, please run cmake with option -DOCLICD_COMPAT=0.")
> + ENDIF(OCLIcd_FOUND)
> ENDIF(OCLICD_COMPAT)
>
> Find_Package(PythonInterp)
> --
> 2.1.4
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list