Skip to content

Commit 49628f4

Browse files
committed
build: utils: Fixed issue with installed multiple version of the OpenCL
1 parent 5baba71 commit 49628f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/FindOpenCL.cmake

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@ function(_FIND_OPENCL_VERSION)
4747
set(CMAKE_REQUIRED_QUIET ${OpenCL_FIND_QUIETLY})
4848

4949
CMAKE_PUSH_CHECK_STATE()
50-
foreach(VERSION "2_2" "2_1" "2_0" "1_2" "1_1" "1_0")
50+
foreach(VERSION "3_0" "2_2" "2_1" "2_0" "1_2" "1_1" "1_0")
5151
set(CMAKE_REQUIRED_INCLUDES "${OpenCL_INCLUDE_DIR}")
5252

5353
if(APPLE)
5454
CHECK_SYMBOL_EXISTS(
5555
CL_VERSION_${VERSION}
56-
"${OpenCL_INCLUDE_DIR}/Headers/cl.h"
56+
"Headers/cl.h"
5757
OPENCL_VERSION_${VERSION})
5858
else()
5959
CHECK_SYMBOL_EXISTS(
6060
CL_VERSION_${VERSION}
61-
"${OpenCL_INCLUDE_DIR}/CL/cl.h"
61+
"CL/cl.h"
6262
OPENCL_VERSION_${VERSION})
6363
endif()
6464

0 commit comments

Comments
 (0)