File: fix-logic-so-opencl-is-not-linked-if-ope

package info (click to toggle)
armnn 23.08-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 53,580 kB
  • sloc: cpp: 337,440; python: 4,755; sh: 1,708; makefile: 42; asm: 15; xml: 6
file content (26 lines) | stat: -rw-r--r-- 783 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Francis Murtagh <francis.murtagh@arm.com>
Date: Tue, 1 Aug 2023 21:39:26 +0200
Subject: Fix logic so OpenCL is not linked if OPENCL_LIBRARIES

X-Dgit-Generated: 20.08-1 e76ce195d3af29fd378ceb738a1787d7ad1c3ae1

Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
---
 CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 81aa7ae..c7b8ab3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -565,6 +565,10 @@ if (ARMNNTOSAREF)
     endif()
 endif()
 
+if(ARMCOMPUTECL AND OPENCL_LIBRARIES)
+    target_link_libraries(armnn ${OPENCL_LIBRARIES})
+endif()
+
 if(PROFILING_BACKEND_STREAMLINE AND (NOT ("${CMAKE_SYSTEM_NAME}" STREQUAL Android)))
     target_link_libraries(armnn PUBLIC ${CMAKE_THREAD_LIBS_INIT})
 endif()