[Beignet] [PATCH] CMAKE: if user disable ICD support, must pass cmake option explicitly.
Yang Rong
rong.r.yang at intel.com
Wed Feb 8 04:52:55 UTC 2017
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
More information about the Beignet
mailing list