From 39511969a83ed754408345ad16a83ff0d5b703ae Mon Sep 17 00:00:00 2001 From: Marek Szuba Date: Wed, 25 Jan 2017 13:57:47 +0100 Subject: [PATCH] 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 --- 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