Files
rocm-systems/rocclr/cmake/FindROCclr.cmake
T
Vladislav Sytchenko 30f1fcaf53 SWDEV-273235 - Initial support for Windows CMake
This change is tied to the ROCclr cmake rework. ROCclr will now be built
as part of HIP itself.

All the dependencies on comgr and rocr have been moved into ROCclr
itself. This allows HIP to pull in all the required compiler/runtime
dependencies by simply linking against ROCclr. Note that ROCclr needs to
be configured from HIP cmake command line. If not, we will default to
LC + ROCr support.

Since HIP depends on ROCclr and ROCclr depends on OpenCL, HIP will
transitevly pull in all the required OpenCL headers. No need to keep a
local copy of them anymore.

Change-Id: Ib39f4929e88da1248be962490c150b10fc7abd3a
2021-05-27 15:21:05 -04:00

52 lines
1.8 KiB
CMake

# Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
if(ROCCLR_FOUND)
return()
endif()
find_path(ROCCLR_INCLUDE_DIR top.hpp
HINTS
${ROCCLR_PATH}
PATHS
# gerrit repo name
${CMAKE_SOURCE_DIR}/vdi
${CMAKE_SOURCE_DIR}/../vdi
${CMAKE_SOURCE_DIR}/../../vdi
# github repo name
${CMAKE_SOURCE_DIR}/ROCclr
${CMAKE_SOURCE_DIR}/../ROCclr
${CMAKE_SOURCE_DIR}/../../ROCclr
# jenkins repo name
${CMAKE_SOURCE_DIR}/rocclr
${CMAKE_SOURCE_DIR}/../rocclr
${CMAKE_SOURCE_DIR}/../../rocclr
PATH_SUFFIXES
include)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ROCCLR
"\nROCclr not found"
ROCCLR_INCLUDE_DIR)
mark_as_advanced(ROCCLR_INCLUDE_DIR)
list(APPEND CMAKE_MODULE_PATH "${ROCCLR_INCLUDE_DIR}/../cmake")
include(ROCclr)