SWDEV-425678 - Fix build failure in HIP samples
- Due to file reorg path changes cmake fails at find_package(hip) unless CMAKE_PREFIX_PATH is set explicitly - Update CMakeLists.txt to set CMAKE_PREFIX_PATH - Update Readme Change-Id: Ibdb4419efcdd6583b059a728e48dfdb8f927a48b
This commit is contained in:
committed by
Rahul Manocha
parent
d04b8bf458
commit
4dfa7ca7e6
@@ -23,6 +23,15 @@ project(hipDispatchLatency)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
include_directories(../../common)
|
||||
|
||||
if(UNIX)
|
||||
if(NOT DEFINED ROCM_PATH)
|
||||
set(ROCM_PATH "/opt/rocm" CACHE STRING "Default ROCM installation directory.")
|
||||
endif()
|
||||
# Search for rocm in common locations
|
||||
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH})
|
||||
endif()
|
||||
|
||||
# Find hip
|
||||
find_package(hip)
|
||||
|
||||
|
||||
@@ -26,6 +26,13 @@ set(CMAKE_CXX_COMPILER_WORKS 1)
|
||||
project(hipInfo)
|
||||
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
if(UNIX)
|
||||
if(NOT DEFINED ROCM_PATH)
|
||||
set(ROCM_PATH "/opt/rocm" CACHE STRING "Default ROCM installation directory.")
|
||||
endif()
|
||||
# Search for rocm in common locations
|
||||
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH})
|
||||
endif()
|
||||
|
||||
# flag is set to ON in compute build for windows
|
||||
option(HIPINFO_INTERNAL_BUILD "Enable building hipInfo from compute" OFF)
|
||||
|
||||
Reference in New Issue
Block a user