summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-09-02 18:53:41 (GMT)
committerZack Galbreath <zack.galbreath@kitware.com>2021-06-07 19:25:33 (GMT)
commit947dbed0aa502c70a9e165757450bd8409036980 (patch)
tree0a45b31986184368c7ad6df72d9f9186c7a24b4c /Modules/Compiler
parentb50bfc89131e55685aa41146254b37d26049b4d5 (diff)
downloadCMake-947dbed0aa502c70a9e165757450bd8409036980.zip
CMake-947dbed0aa502c70a9e165757450bd8409036980.tar.gz
CMake-947dbed0aa502c70a9e165757450bd8409036980.tar.bz2
HIP: Automatically inject the `hip::device` runtime target
Any target that might need to link to hip code needs the `hip::device` target
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/Clang-HIP.cmake4
-rw-r--r--Modules/Compiler/ROCMClang-HIP.cmake4
2 files changed, 8 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang-HIP.cmake b/Modules/Compiler/Clang-HIP.cmake
index 6ac39de..1030a43 100644
--- a/Modules/Compiler/Clang-HIP.cmake
+++ b/Modules/Compiler/Clang-HIP.cmake
@@ -14,3 +14,7 @@ endif()
set(CMAKE_HIP_RUNTIME_LIBRARY_DEFAULT "SHARED")
set(CMAKE_HIP_RUNTIME_LIBRARY_LINK_OPTIONS_STATIC "")
set(CMAKE_HIP_RUNTIME_LIBRARY_LINK_OPTIONS_SHARED "")
+
+# Populated by CMakeHIPRuntime.cmake
+set(CMAKE_HIP_RUNTIME_LIBRARIES_STATIC "")
+set(CMAKE_HIP_RUNTIME_LIBRARIES_SHARED "")
diff --git a/Modules/Compiler/ROCMClang-HIP.cmake b/Modules/Compiler/ROCMClang-HIP.cmake
index 9e792b5..7af7699 100644
--- a/Modules/Compiler/ROCMClang-HIP.cmake
+++ b/Modules/Compiler/ROCMClang-HIP.cmake
@@ -42,4 +42,8 @@ set(CMAKE_HIP_RUNTIME_LIBRARY_DEFAULT "SHARED")
set(CMAKE_HIP_RUNTIME_LIBRARY_LINK_OPTIONS_STATIC "")
set(CMAKE_HIP_RUNTIME_LIBRARY_LINK_OPTIONS_SHARED "")
+# Populated by CMakeHIPRuntime.cmake
+set(CMAKE_HIP_RUNTIME_LIBRARIES_STATIC "")
+set(CMAKE_HIP_RUNTIME_LIBRARIES_SHARED "")
+
__compiler_check_default_language_standard(HIP 3.5 11)