From 2e2c1e3ea548878242ef10ed877dc81739acf352 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sun, 20 Nov 2022 14:19:27 -0600 Subject: OpenCL: Do not assume that OpenCL framework is always used in Apple --- Modules/FindOpenCL.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindOpenCL.cmake b/Modules/FindOpenCL.cmake index 5c7aa22..2b700ff 100644 --- a/Modules/FindOpenCL.cmake +++ b/Modules/FindOpenCL.cmake @@ -48,7 +48,7 @@ function(_FIND_OPENCL_VERSION) foreach(VERSION "3_0" "2_2" "2_1" "2_0" "1_2" "1_1" "1_0") set(CMAKE_REQUIRED_INCLUDES "${OpenCL_INCLUDE_DIR}") - if(APPLE) + if(EXISTS ${OpenCL_INCLUDE_DIR}/Headers/cl.h) CHECK_SYMBOL_EXISTS( CL_VERSION_${VERSION} "${OpenCL_INCLUDE_DIR}/Headers/cl.h" -- cgit v0.12