From 50a8dafc0d040cfc32f9259d4524cf9d410bdd04 Mon Sep 17 00:00:00 2001 From: Steve Leung Date: Thu, 23 May 2024 14:36:36 -0600 Subject: [PATCH] Update package dependencies for static compilation (#393) Co-authored-by: Lauren Wrubleski --- CMakeLists.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fcac679..7dd62f00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -257,14 +257,25 @@ if(BUILD_DOCS) endif() # Package specific CPACK vars +## add dependency on hip runtime for shared libraries +set(HIP_RUNTIME_MINIMUM 4.5.0) if(BUILD_ADDRESS_SANITIZER) set(DEPENDS_HIP_RUNTIME "hip-runtime-amd-asan" ) else() set(DEPENDS_HIP_RUNTIME "hip-runtime-amd" ) endif() -rocm_package_add_dependencies(DEPENDS "${DEPENDS_HIP_RUNTIME} >= 4.5.0") +rocm_package_add_dependencies(SHARED_DEPENDS "${DEPENDS_HIP_RUNTIME} >= ${HIP_RUNTIME_MINIMUM}") + +## add dependency on hip runtime for static libraries +rocm_package_add_deb_dependencies(STATIC_DEPENDS "hip-static-dev >= ${HIP_RUNTIME_MINIMUM}") +rocm_package_add_rpm_dependencies(STATIC_DEPENDS "hip-static-devel >= ${HIP_RUNTIME_MINIMUM}") + +## add dependency on rocBLAS if (rocblas_FOUND) - rocm_package_add_dependencies(DEPENDS "rocblas >= 4.1.0") + set(ROCBLAS_MINIMUM "4.1.0") + rocm_package_add_dependencies(SHARED_DEPENDS "rocblas >= ${ROCBLAS_MINIMUM}") + rocm_package_add_deb_dependencies(STATIC_DEPENDS "rocblas-static-dev >= ${ROCBLAS_MINIMUM}") + rocm_package_add_rpm_dependencies(STATIC_DEPENDS "rocblas-static-devel >= ${ROCBLAS_MINIMUM}") else() message("Build rocSPARSE with rocBLAS is disabled since rocBLAS is not found") endif()