summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeHIPInformation.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-09-20 16:38:23 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-09-20 16:38:44 (GMT)
commit36966f63ca9b43e5e2c8d7e9e0264181499734b1 (patch)
tree671ddcea389f71feaf0f4c12106144d0d830d39b /Modules/CMakeHIPInformation.cmake
parentc03a216ca8b8fd3e01ddd3178cadacbdd5191203 (diff)
parentcb93f7262469d0f7e1b7da01ad3586d001234af2 (diff)
downloadCMake-36966f63ca9b43e5e2c8d7e9e0264181499734b1.zip
CMake-36966f63ca9b43e5e2c8d7e9e0264181499734b1.tar.gz
CMake-36966f63ca9b43e5e2c8d7e9e0264181499734b1.tar.bz2
Merge topic 'hip-no-hipcc'
cb93f72624 HIP: Simplify detection of HIP runtime CMake package a71f0fc9c7 HIP: Remove ROMClang compiler id and use Clang directly b125e9809a HIP: Detect ROCm path earlier 735f41fc2d HIP: Use 'rocm_agent_enumerator' to determine CMAKE_HIP_ARCHITECTURES Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Raul Tambre <raul@tambre.ee> Acked-by: Axel Huebl <axel.huebl@plasma.ninja> Merge-request: !6533
Diffstat (limited to 'Modules/CMakeHIPInformation.cmake')
-rw-r--r--Modules/CMakeHIPInformation.cmake11
1 files changed, 7 insertions, 4 deletions
diff --git a/Modules/CMakeHIPInformation.cmake b/Modules/CMakeHIPInformation.cmake
index 9862f24..4c57677 100644
--- a/Modules/CMakeHIPInformation.cmake
+++ b/Modules/CMakeHIPInformation.cmake
@@ -141,8 +141,11 @@ endif()
set(CMAKE_HIP_INFORMATION_LOADED 1)
# Load the file and find the relevant HIP runtime.
-# This file will only exist after all compiler detection has finished
-include(${CMAKE_PLATFORM_INFO_DIR}/CMakeHIPRuntime.cmake OPTIONAL)
-if(COMMAND _CMAKE_FIND_HIP_RUNTIME)
- _CMAKE_FIND_HIP_RUNTIME()
+if(NOT DEFINED _CMAKE_HIP_DEVICE_RUNTIME_TARGET)
+ set(hip-lang_DIR "${CMAKE_HIP_COMPILER_ROCM_ROOT}/lib/cmake/hip-lang")
+ find_package(hip-lang CONFIG QUIET NO_DEFAULT_PATH)
+endif()
+if(DEFINED _CMAKE_HIP_DEVICE_RUNTIME_TARGET)
+ list(APPEND CMAKE_HIP_RUNTIME_LIBRARIES_STATIC ${_CMAKE_HIP_DEVICE_RUNTIME_TARGET})
+ list(APPEND CMAKE_HIP_RUNTIME_LIBRARIES_SHARED ${_CMAKE_HIP_DEVICE_RUNTIME_TARGET})
endif()