summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeHIPInformation.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-31 20:41:49 (GMT)
committerBrad King <brad.king@kitware.com>2023-05-31 20:53:47 (GMT)
commitbae57dc28179022ba0b654368efc451e36db6396 (patch)
tree01beb28fdb3baad6f1532bba58583a4999ecf294 /Modules/CMakeHIPInformation.cmake
parentcc737ae8295156812e697a9d2f3f7b79bf7b72c8 (diff)
downloadCMake-bae57dc28179022ba0b654368efc451e36db6396.zip
CMake-bae57dc28179022ba0b654368efc451e36db6396.tar.gz
CMake-bae57dc28179022ba0b654368efc451e36db6396.tar.bz2
HIP: Fix search for hip-lang CMake package on multiarch distros
We need `CMAKE_LIBRARY_ARCHITECTURE` to find the package before HIP compiler ABI detection. However, if HIP is the first enabled language, the value is not known until `CMAKE_HIP_LIBRARY_ARCHITECTURE` is determined by the ABI detection step. Resolve this by detecting `CMAKE_HIP_LIBRARY_ARCHITECTURE` from the compiler id output. Fixes: #24562
Diffstat (limited to 'Modules/CMakeHIPInformation.cmake')
-rw-r--r--Modules/CMakeHIPInformation.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeHIPInformation.cmake b/Modules/CMakeHIPInformation.cmake
index 33f8697..41a98db 100644
--- a/Modules/CMakeHIPInformation.cmake
+++ b/Modules/CMakeHIPInformation.cmake
@@ -142,7 +142,7 @@ set(CMAKE_HIP_INFORMATION_LOADED 1)
# Load the file and find the relevant HIP runtime.
if(NOT DEFINED _CMAKE_HIP_DEVICE_RUNTIME_TARGET)
- set(hip-lang_DIR "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib/cmake/hip-lang")
+ set(hip-lang_DIR "${CMAKE_HIP_COMPILER_ROCM_LIB}/cmake/hip-lang")
find_package(hip-lang CONFIG QUIET NO_DEFAULT_PATH REQUIRED)
endif()
if(DEFINED _CMAKE_HIP_DEVICE_RUNTIME_TARGET)