summaryrefslogtreecommitdiff
path: root/Modules/CMakeTestHIPCompiler.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-09-14 17:14:22 +0000
committerBrad King <brad.king@kitware.com>2021-09-16 15:33:53 -0400
commitcb93f7262469d0f7e1b7da01ad3586d001234af2 (patch)
treeee450b9b1157f07ff1c3b250781749cb848fc9be /Modules/CMakeTestHIPCompiler.cmake
parenta71f0fc9c7762a06d0bfdd64d0d490919e12357a (diff)
downloadcmake-cb93f7262469d0f7e1b7da01ad3586d001234af2.tar.gz
HIP: Simplify detection of HIP runtime CMake package
It only makes sense to use the CMake package from the same ROCm installation that the compiler uses. Ask the HIP compiler to report the location of the ROCm installation. Verify up front that it contains the expected CMake package file.
Diffstat (limited to 'Modules/CMakeTestHIPCompiler.cmake')
-rw-r--r--Modules/CMakeTestHIPCompiler.cmake21
1 files changed, 0 insertions, 21 deletions
diff --git a/Modules/CMakeTestHIPCompiler.cmake b/Modules/CMakeTestHIPCompiler.cmake
index 62f06573ad..5acd806240 100644
--- a/Modules/CMakeTestHIPCompiler.cmake
+++ b/Modules/CMakeTestHIPCompiler.cmake
@@ -81,20 +81,6 @@ unset(__CMAKE_HIP_FLAGS)
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompileFeatures.cmake)
CMAKE_DETERMINE_COMPILE_FEATURES(HIP)
-
-# Setup the following:
-# Configure the new template file CMakeHipRuntime.cmake to
-# - ${CMAKE_PLATFORM_INFO_DIR}/
-# This file will do the actual find_package query. We than have
-# CMakeHIPInformation.cmake include `CMakeHipRuntime`
-# So it is included once system information has been finished
-#
-configure_file(
- ${CMAKE_ROOT}/Modules/CMakeHIPRuntime.cmake.in
- ${CMAKE_PLATFORM_INFO_DIR}/CMakeHIPRuntime.cmake
- @ONLY
-)
-
# Re-configure to save learned information.
configure_file(
${CMAKE_ROOT}/Modules/CMakeHIPCompiler.cmake.in
@@ -113,10 +99,3 @@ endif()
set(CMAKE_TRY_COMPILE_TARGET_TYPE ${__CMAKE_SAVED_TRY_COMPILE_TARGET_TYPE})
unset(__CMAKE_SAVED_TRY_COMPILE_TARGET_TYPE)
unset(__CMAKE_HIP_COMPILER_OUTPUT)
-
-# 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)
-if(COMMAND _CMAKE_FIND_HIP_RUNTIME)
- _CMAKE_FIND_HIP_RUNTIME()
-endif()