1# //===----------------------------------------------------------------------===//
2# //
3# // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4# // See https://llvm.org/LICENSE.txt for details.
5# // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6# //
7# //===----------------------------------------------------------------------===//
8
9find_package(hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX} PATHS /opt/rocm)
10if (NOT ${hsa-runtime64_FOUND})
11  message(STATUS "Not building amdgpu-arch: hsa-runtime64 not found")
12  return()
13endif()
14
15add_clang_tool(amdgpu-arch AMDGPUArch.cpp)
16
17set_target_properties(amdgpu-arch PROPERTIES INSTALL_RPATH_USE_LINK_PATH ON)
18
19clang_target_link_libraries(amdgpu-arch PRIVATE hsa-runtime64::hsa-runtime64)
20