summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorGergely Meszaros <maetveis@gmail.com>2022-10-09 19:47:20 +0200
committerGergely Meszaros <maetveis@gmail.com>2022-10-09 19:47:20 +0200
commit6021fa7928c716e5e83fa74a8dfb09cfcf45d53e (patch)
tree2b3c462d2ed0c7a6a9e8b7cc1a8f6996de95b3eb /Modules
parent8b15f532db1b424e2218fc26ffd936a32044afa1 (diff)
downloadcmake-6021fa7928c716e5e83fa74a8dfb09cfcf45d53e.tar.gz
HIP: Convert clang output to cmake style paths
On windows the location of the rocm root directory as reported by clang might be in windows style (with backslashes) which breaks the cache.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineHIPCompiler.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineHIPCompiler.cmake b/Modules/CMakeDetermineHIPCompiler.cmake
index 7b7d7a3b4a..6294d047cf 100644
--- a/Modules/CMakeDetermineHIPCompiler.cmake
+++ b/Modules/CMakeDetermineHIPCompiler.cmake
@@ -86,6 +86,7 @@ if(NOT CMAKE_HIP_COMPILER_ROCM_ROOT AND CMAKE_HIP_COMPILER_ID STREQUAL "Clang")
if(_CMAKE_HIP_COMPILER_RESULT EQUAL 0 AND _CMAKE_HIP_COMPILER_STDERR MATCHES "Found HIP installation: *([^,]*)[,\n]")
set(CMAKE_HIP_COMPILER_ROCM_ROOT "${CMAKE_MATCH_1}")
+ file(TO_CMAKE_PATH "${CMAKE_HIP_COMPILER_ROCM_ROOT}" CMAKE_HIP_COMPILER_ROCM_ROOT)
endif()
endif()
if(NOT CMAKE_HIP_COMPILER_ROCM_ROOT)