[Beignet] [PATCH] CMAKE: if user disable ICD support, must pass cmake option explicitly.
Pan, Xiuli
xiuli.pan at intel.com
Fri Feb 10 07:07:49 UTC 2017
LGTM!
-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Yang Rong
Sent: Wednesday, February 8, 2017 12:53 PM
To: beignet at lists.freedesktop.org
Cc: Yang, Rong R <rong.r.yang at intel.com>
Subject: [Beignet] [PATCH] CMAKE: if user disable ICD support, must pass cmake option explicitly.
Also update readme aoubt ocl-icd section.
Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
CMakeLists.txt | 1 +
docs/Beignet.mdwn | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3246567..fbc8027 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -224,6 +224,7 @@ IF(OCLIcd_FOUND)
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)
ENDIF(OCLICD_COMPAT)
diff --git a/docs/Beignet.mdwn b/docs/Beignet.mdwn
index 5c62b4c..c91af6a 100644
--- a/docs/Beignet.mdwn
+++ b/docs/Beignet.mdwn
@@ -29,7 +29,8 @@ two more packages (the following package name is for Ubuntu):
- ocl-icd-libopencl1
If you don't want to enable ICD, or your system doesn't have ICD OpenCL support,
-you can still link to the beignet OpenCL library. You can find the beignet/libcl.so
+you must explicitly disable ICD support by running cmake with option `-DOCLICD_COMPAT=0`
+then you can still link to the beignet OpenCL library. You can find the beignet/libcl.so
in your system's library installation directories.
Note that the compiler depends on LLVM (Low-Level Virtual Machine project), and the
--
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