From a665dc415fd42cca7900ad0562b9a29da8325112 Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Mon, 20 Sep 2021 21:05:59 -0500 Subject: [PATCH] Correct and simplify package dependencies. Package should depend on hsa-rocr, not hsa-rocr-dev. Also Remove negative path for dependency rocm-core (unconditional add + conditional remove simplified to conditional add). Change-Id: I6ead202f4f3f2f77b1da2ffed77feee956caf2e9 [ROCm/rocminfo commit: 86560046de79611f45065262918746acfa061d74] --- projects/rocminfo/CMakeLists.txt | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/projects/rocminfo/CMakeLists.txt b/projects/rocminfo/CMakeLists.txt index 98fbd8ef70..1dafe573da 100755 --- a/projects/rocminfo/CMakeLists.txt +++ b/projects/rocminfo/CMakeLists.txt @@ -202,17 +202,19 @@ if(DEFINED ENV{ROCM_LIBPATCH_VERSION}) endif() #Debian package specific variables -set(CPACK_DEBIAN_PACKAGE_DEPENDS "hsa-rocr-dev") +set(CPACK_DEBIAN_PACKAGE_DEPENDS "hsa-rocr") set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${CPACK_DEBIAN_PACKAGE_HOMEPAGE} CACHE STRING "https://github.com/RadeonOpenCompute/ROCm") if (DEFINED ENV{CPACK_DEBIAN_PACKAGE_RELEASE}) set(CPACK_DEBIAN_PACKAGE_RELEASE $ENV{CPACK_DEBIAN_PACKAGE_RELEASE}) else() set(CPACK_DEBIAN_PACKAGE_RELEASE "local") endif() -set(CPACK_DEBIAN_PACKAGE_DEPENDS "rocm-core") +if ( ROCM_DEP_ROCMCORE ) + string ( APPEND CPACK_DEBIAN_PACKAGE_DEPENDS ", rocm-core" ) +endif() #RPM package specific variables -set(CPACK_RPM_PACKAGE_DEPENDS "hsa-rocr-dev") +set(CPACK_RPM_PACKAGE_REQUIRES "hsa-rocr") if(DEFINED CPACK_PACKAGING_INSTALL_PREFIX) set ( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "${CPACK_PACKAGING_INSTALL_PREFIX} ${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}" ) endif() @@ -221,7 +223,9 @@ if(DEFINED ENV{CPACK_RPM_PACKAGE_RELEASE}) else() set(CPACK_RPM_PACKAGE_RELEASE "local") endif() -set(CPACK_RPM_PACKAGE_REQUIRES "rocm-core") +if ( ROCM_DEP_ROCMCORE ) + string ( APPEND CPACK_RPM_PACKAGE_REQUIRES " rocm-core" ) +endif() #Set rpm distro if(CPACK_RPM_PACKAGE_RELEASE) @@ -234,10 +238,5 @@ set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSIO #Set the names now using CPACK utility set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") -# Remove dependency on rocm-core if -DROCM_DEP_ROCMCORE=ON not given to cmake -if(NOT ROCM_DEP_ROCMCORE) - string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_PACKAGE_REQUIRES ${CPACK_RPM_PACKAGE_REQUIRES}) - string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_DEPENDS}) -endif() include ( CPack )