Skip to content
Draft
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion share/rocm/cmake/ROCMInstallTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ function(rocm_install)
if(ARGV0 STREQUAL "TARGETS")
# rocm_install_targets deals with the component in its own fashion.
rocm_install_targets("${ARGN}")
elseif(ENABLE_ASAN_PACKAGING)
set(oneValueArgs ASAN_DESTINATION DESTINATION COMPONENT)
cmake_parse_arguments(PARSE "" "${oneValueArgs}" "" ${ARGN})
if(DEFINED PARSE_ASAN_DESTINATION)
install(
${PARSE_UNPARSED_ARGUMENTS}
DESTINATION ${PARSE_ASAN_DESTINATION}
COMPONENT runtime
)
endif()
elseif(NOT ROCM_USE_DEV_COMPONENT)
# If we want legacy behaviour, directly call install with no meddling.
install(${ARGN})
Expand Down Expand Up @@ -119,12 +129,16 @@ endfunction()
option(ROCM_SYMLINK_LIBS "Create backwards compatibility symlink for library files." ON)

function(rocm_install_targets)
set(options)
set(options PRIVATE)
set(oneValueArgs PREFIX EXPORT COMPONENT)
set(multiValueArgs TARGETS INCLUDE)

cmake_parse_arguments(PARSE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

if(PARSE_PRIVATE AND ENABLE_ASAN_PACKAGING)
return()
endif()

string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
set(EXPORT_FILE ${PROJECT_NAME_LOWER}-targets)
if(PARSE_EXPORT)
Expand Down