Skip to content

Commit

Permalink
Correct path for ROCMConfig redirect (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
lawruble13 authored Jan 11, 2024
1 parent 6b93dd1 commit c364583
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion share/rocm/cmake/ROCMConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,18 @@
# Copyright (C) 2023 Advanced Micro Devices, Inc.
# ######################################################################################################################

find_package(ROCmCMakeBuildTools HINTS "${CMAKE_CURRENT_LIST_DIR}")
get_filename_component(_new_rocmcmakebuildtools_path "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY)
get_filename_component(_new_rocmcmakebuildtools_path "${_new_rocmcmakebuildtools_path}" DIRECTORY)
# two directories up is sufficient for windows search, but linux search requires the share directory
get_filename_component(_new_rocmcmakebuildtools_path_linux "${_new_rocmcmakebuildtools_path}" DIRECTORY)

include(CMakeFindDependencyMacro)

find_dependency(
ROCmCMakeBuildTools
HINTS
"${_new_rocmcmakebuildtools_path}"
"${_new_rocmcmakebuildtools_path_linux}")

unset(_new_rocmcmakebuildtools_path)
unset(_new_rocmcmakebuildtools_path_linux)

0 comments on commit c364583

Please sign in to comment.