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

Marek Szuba Marek.Szuba at cern.ch
Wed Jan 25 13:04:21 UTC 2017


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



More information about the Beignet mailing list