fix opencl.hpp detection
authorAndreas Beckmann <anbe@debian.org>
Tue, 13 Dec 2022 03:08:31 +0000 (03:08 +0000)
committerAndreas Beckmann <anbe@debian.org>
Tue, 13 Dec 2022 03:08:31 +0000 (03:08 +0000)
Gbp-Pq: Name fix-opencl.hpp-detection.patch

CMakeLists.txt

index d44ba70e7404c1410ea6246f50ec1f861b387f80..b59ef51222e48f98ea50416d59b96952f1214501 100644 (file)
@@ -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")