summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGergely Meszaros <maetveis@gmail.com>2022-10-09 17:47:20 (GMT)
committerGergely Meszaros <maetveis@gmail.com>2022-10-09 17:47:20 (GMT)
commit6021fa7928c716e5e83fa74a8dfb09cfcf45d53e (patch)
tree2b3c462d2ed0c7a6a9e8b7cc1a8f6996de95b3eb
parent8b15f532db1b424e2218fc26ffd936a32044afa1 (diff)
downloadCMake-6021fa7928c716e5e83fa74a8dfb09cfcf45d53e.zip
CMake-6021fa7928c716e5e83fa74a8dfb09cfcf45d53e.tar.gz
CMake-6021fa7928c716e5e83fa74a8dfb09cfcf45d53e.tar.bz2
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.
-rw-r--r--Modules/CMakeDetermineHIPCompiler.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineHIPCompiler.cmake b/Modules/CMakeDetermineHIPCompiler.cmake
index 7b7d7a3..6294d04 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)