summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMarek Szuba <Marek.Szuba@cern.ch>2017-01-25 14:04:21 +0100
committerYang Rong <rong.r.yang@intel.com>2017-02-07 17:28:18 +0800
commit2a0fae0a276b09c9fe6407e3a8a6db69d77ac410 (patch)
tree9ebf18baa762770feadf7397ecd49f78685f3c22 /CMakeLists.txt
parent75d5f5c55fe677c7497af54104dc89500fa09cf6 (diff)
downloadbeignet-2a0fae0a276b09c9fe6407e3a8a6db69d77ac410.tar.gz
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 Signed-off-by: Marek Szuba <Marek.Szuba@cern.ch> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 59abc455..3246567d 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)