diff --git a/catch/packaging/hip-tests.txt b/catch/packaging/hip-tests.txt index ed5e51943..b7cc375fb 100644 --- a/catch/packaging/hip-tests.txt +++ b/catch/packaging/hip-tests.txt @@ -69,12 +69,27 @@ set(CPACK_PACKAGE_DESCRIPTION "HIP: Heterogenous-computing Interface for Portability [CATCH TESTS]") set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.") set(CPACK_PACKAGE_CONTACT "HIP Support ") -set(CPACK_PACKAGE_VERSION @HIP_VERSION_MAJOR@.@HIP_VERSION_MINOR@.@HIP_VERSION_PATCH_GITHASH@) +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() +if(DEFINED ENV{CPACK_RPM_PACKAGE_RELEASE}) + set(CPACK_RPM_PACKAGE_RELEASE $ENV{CPACK_RPM_PACKAGE_RELEASE}) +else() + set(CPACK_RPM_PACKAGE_RELEASE "local") +endif() +set(ROCM_VERSION_FOR_PACKAGE "99999") +if(DEFINED ENV{ROCM_LIBPATCH_VERSION}) + set(ROCM_VERSION_FOR_PACKAGE $ENV{ROCM_LIBPATCH_VERSION}) +endif() # to remove hip-catch-* package during uninstallation of rocm set (CPACK_DEBIAN_PACKAGE_DEPENDS "rocm-core") set (CPACK_RPM_PACKAGE_REQUIRES "rocm-core") +set(CPACK_PACKAGE_VERSION @HIP_VERSION_MAJOR@.@HIP_VERSION_MINOR@.@HIP_VERSION_PATCH@.${ROCM_VERSION_FOR_PACKAGE}) + if(NOT WIN32) set(CPACK_GENERATOR "TGZ;DEB;RPM" CACHE STRING "Linux package types for catch tests") set(CPACK_BINARY_DEB "ON")