From 4c79031b149b1d029c13d474cc2bd4f273470286 Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Tue, 13 Dec 2022 03:08:31 +0000 Subject: [PATCH] fix opencl.hpp detection Gbp-Pq: Name fix-opencl.hpp-detection.patch --- CMakeLists.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d44ba70..b59ef51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1010,15 +1010,23 @@ endif() # if ICD is disabled, we might as well compile with our own headers if(OPENCL_H AND ENABLE_ICD) - message(STATUS "OpenCL.h found (${OPENCL_H}) and ICD enabled, NOT installing our headers") + message(STATUS "opencl.h found (${OPENCL_H}) and ICD enabled, NOT installing our headers") set(HAVE_OPENCL_H ON) set(IOH OFF) else() - message(STATUS "OpenCL.h not found or ICD disabled, installing our headers") + message(STATUS "opencl.h not found or ICD disabled, installing our headers") set(HAVE_OPENCL_H OFF) set(IOH ON) endif() +if(OPENCL_HPP) + message(STATUS "opencl.hpp found (${OPENCL_HPP})") + set(HAVE_OPENCL_HPP ON) +else() + message(STATUS "opencl.hpp not found") + set(HAVE_OPENCL_HPP OFF) +endif() + if(NOT DEFINED INSTALL_OPENCL_HEADERS) option(INSTALL_OPENCL_HEADERS "Install POCL's OpenCL headers. (Ones from Khronos should be installed instead)" ${IOH}) endif() @@ -1057,7 +1065,7 @@ macro(set_opencl_header_includes) if(NOT HAVE_OPENCL_H) include_directories("${CMAKE_SOURCE_DIR}/include") endif() - if(NOT OPENCL_CL2_HPP) + if(NOT HAVE_OPENCL_HPP) include_directories("${CMAKE_SOURCE_DIR}/include/hpp") endif() include_directories("${CMAKE_SOURCE_DIR}/poclu") -- 2.30.2