From 0f3cadab979fa15a5c97d90a565fcbbecb3e5992 Mon Sep 17 00:00:00 2001 From: Lauren Wrubleski Date: Fri, 19 Jul 2024 03:10:08 -0600 Subject: [PATCH] Don't set `CPACK_RPM_MAIN_COMPONENT' for ASAN builds Setting `CPACK_RPM_MAIN_COMPONENT` to any component causes the package name for that component to be automatically generated from `CPACK_PACKAGE_NAME` (ignoring the other work we've done to correct the name), which in particular causes the runtime packages for ASAN builds to not be generated with the ASAN suffix. In order to minimize the impact, I'm disabling this call only in the case that we're doing an ASAN build, I don't want to break any other spots where it is actually working correctly, but I think we should investigate removing this entirely. --- share/rocmcmakebuildtools/cmake/ROCMCreatePackage.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/rocmcmakebuildtools/cmake/ROCMCreatePackage.cmake b/share/rocmcmakebuildtools/cmake/ROCMCreatePackage.cmake index 3733c74a..1cab2d8d 100755 --- a/share/rocmcmakebuildtools/cmake/ROCMCreatePackage.cmake +++ b/share/rocmcmakebuildtools/cmake/ROCMCreatePackage.cmake @@ -531,7 +531,9 @@ macro(rocm_set_comp_cpackvar HEADER_ONLY NAME_SUFFIX components) set(CPACK_DEBIAN_RUNTIME_FILE_NAME "DEB-DEFAULT") endif() if (NOT ${HEADER_ONLY} AND BUILD_SHARED_LIBS) - set(CPACK_RPM_MAIN_COMPONENT "runtime") + if (NOT ENABLE_ASAN_PACKAGING) + set(CPACK_RPM_MAIN_COMPONENT "runtime") + endif() list(APPEND CPACK_COMPONENTS_ALL runtime) endif() endif()