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.
This commit is contained in:
Gergely Meszaros
2022-10-09 19:47:20 +02:00
parent 8b15f532db
commit 6021fa7928

View File

@@ -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)