From c44428f4da972b35cad0e1b58734d98932d34283 Mon Sep 17 00:00:00 2001
From: Bram Veenboer <bram.veenboer@gmail.com>
Date: Wed, 4 Oct 2023 17:06:49 +0200
Subject: [PATCH] Dont build OpenCLCorrelatorTest when OpenCL is not found

---
 test/OpenCLCorrelatorTest/CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/OpenCLCorrelatorTest/CMakeLists.txt b/test/OpenCLCorrelatorTest/CMakeLists.txt
index 021f78a..255b6fd 100644
--- a/test/OpenCLCorrelatorTest/CMakeLists.txt
+++ b/test/OpenCLCorrelatorTest/CMakeLists.txt
@@ -1,6 +1,7 @@
 find_package(OpenMP REQUIRED)
-find_package(OpenCL REQUIRED)
+find_package(OpenCL)
 
+if (${OpenCL_FOUND})
 add_executable(OpenCLCorrelatorTest)
 target_sources(OpenCLCorrelatorTest PRIVATE OpenCLCorrelatorTest.cc)
 target_include_directories(OpenCLCorrelatorTest PRIVATE ${CMAKE_SOURCE_DIR}
@@ -14,3 +15,4 @@ target_link_libraries(OpenCLCorrelatorTest PRIVATE ${OpenCL_LIBRARIES}
 #   COMMAND OpenCLCorrelatorTest
 #   # Specify working directory so the kernel code is found
 #   WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+endif()
\ No newline at end of file
-- 
GitLab