depot/third_party/nixpkgs/pkgs/development/compilers/hip/hipamd-config-paths.patch
Default email c3ac4d4040 Project import generated by Copybara.
GitOrigin-RevId: 1158501e7c7cba26d922723cf9f70099995eb755
2022-09-14 15:05:37 -03:00

47 lines
1.7 KiB
Diff

diff --git a/hip-config.cmake.in b/hip-config.cmake.in
index 89d1224e..120b68c6 100755
--- a/hip-config.cmake.in
+++ b/hip-config.cmake.in
@@ -142,7 +142,7 @@ if(HIP_COMPILER STREQUAL "clang")
file(TO_CMAKE_PATH "${HIP_PATH}/../lc" HIP_CLANG_ROOT)
endif()
else()
- set(HIP_CLANG_ROOT "${ROCM_PATH}/llvm")
+ set(HIP_CLANG_ROOT "@llvm@")
endif()
if(NOT HIP_CXX_COMPILER)
set(HIP_CXX_COMPILER ${CMAKE_CXX_COMPILER})
@@ -206,10 +206,7 @@ if(NOT WIN32)
#if HSA is not under ROCm then provide CMAKE_PREFIX_PATH=<HSA_PATH>
find_path(HSA_HEADER hsa/hsa.h
PATHS
- "${_IMPORT_PREFIX}/include"
- #FILE_REORG_BACKWARD_COMPATIBILITY ${_IMPORT_PREFIX}/../include is for Backward compatibility
- "${_IMPORT_PREFIX}/../include"
- ${ROCM_PATH}/include
+ "@rocm_runtime@/include"
)
if (NOT HSA_HEADER)
@@ -224,8 +221,8 @@ set_target_properties(hip::host PROPERTIES
if(HIP_RUNTIME MATCHES "rocclr")
set_target_properties(hip::amdhip64 PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${HSA_HEADER}"
- INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${HSA_HEADER}"
+ INTERFACE_INCLUDE_DIRECTORIES "@hip@/include;${HSA_HEADER}"
+ INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "@hip@/include;${HSA_HEADER}"
)
get_target_property(amdhip64_type hip::amdhip64 TYPE)
@@ -233,8 +230,8 @@ if(HIP_RUNTIME MATCHES "rocclr")
if(NOT WIN32)
set_target_properties(hip::device PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
- INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
+ INTERFACE_INCLUDE_DIRECTORIES "@hip@/include"
+ INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "@hip@/include"
)
endif()
endif()