File: 0035-optional-device-libs-find-package.patch

package info (click to toggle)
rocm-hipamd 5.7.1-6%2Bdeb13u1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 19,840 kB
  • sloc: cpp: 243,188; ansic: 35,728; perl: 1,227; sh: 902; python: 588; asm: 166; makefile: 59
file content (27 lines) | stat: -rw-r--r-- 951 bytes parent folder | download | duplicates (2)
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
27
From: Cordell Bloor <cgmb@slerp.xyz>
Date: Fri, 22 Mar 2024 16:21:50 -0600
Subject: optional device libs for hip find package

When users do find_package(hip REQUIRED), the REQUIRED argument gets
forwarded to find_dependency. However, the device libraries are not
required for many libraries that are using HIP (e.g., C or C++
applications that only use the HIP host interfaces).

Forwarded: no
---
 hipamd/hip-config-amd.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hipamd/hip-config-amd.cmake b/hipamd/hip-config-amd.cmake
index faaa237..6451f02 100755
--- a/hipamd/hip-config-amd.cmake
+++ b/hipamd/hip-config-amd.cmake
@@ -64,7 +64,7 @@ if(NOT HIP_CXX_COMPILER)
 endif()
 
 if(NOT WIN32)
-  find_dependency(AMDDeviceLibs)
+  find_package(AMDDeviceLibs QUIET)
 endif()
 set(AMDGPU_TARGETS "" CACHE STRING "AMD GPU targets to compile for")
 set(GPU_TARGETS "${AMDGPU_TARGETS}" CACHE STRING "GPU targets to compile for")