From 6021fa7928c716e5e83fa74a8dfb09cfcf45d53e Mon Sep 17 00:00:00 2001 From: Gergely Meszaros Date: Sun, 9 Oct 2022 19:47:20 +0200 Subject: 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. --- Modules/CMakeDetermineHIPCompiler.cmake | 1 + 1 file changed, 1 insertion(+) 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) -- cgit v0.12