SWDEV-530015 - Override ROCM_PATH with env if it is set (#171)
This commit is contained in:
committed by
GitHub
parent
90d7eea054
commit
814b1c81cf
@@ -24,7 +24,11 @@ cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
if(UNIX)
|
||||
if(NOT DEFINED ROCM_PATH)
|
||||
set(ROCM_PATH "/opt/rocm" CACHE STRING "Default ROCM installation directory.")
|
||||
if(DEFINED ENV{ROCM_PATH})
|
||||
set(ROCM_PATH $ENV{ROCM_PATH} CACHE STRING "ROCM Path")
|
||||
else()
|
||||
set(ROCM_PATH "/opt/rocm" CACHE STRING "Default ROCM installation directory.")
|
||||
endif()
|
||||
endif()
|
||||
# Search for rocm in common locations
|
||||
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH})
|
||||
|
||||
Reference in New Issue
Block a user