From 9c4a3ed9eebba295edaa0801d5289434907d2f52 Mon Sep 17 00:00:00 2001 From: Kent Russell Date: Tue, 3 May 2022 11:06:25 -0400 Subject: [PATCH] KFDTest: Use default packaging name for kfdtest Previously we omitted the version and arch in the filenames. By adding this, as well as the ROCM build variable, this will allow for easy version version detection on systems. Instead of kfdtest = v1.0.0, now it will feature the build number, allowing for easier identification as to which version is installed. Change-Id: I311ed7010486e7c70af669d282910fe29ee8db45 [ROCm/ROCR-Runtime commit: 9745db30538e129305da74627f92ec4fc8ef8ebf] --- projects/rocr-runtime/tests/kfdtest/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/projects/rocr-runtime/tests/kfdtest/CMakeLists.txt b/projects/rocr-runtime/tests/kfdtest/CMakeLists.txt index 6eeffa5585..5c5db26940 100644 --- a/projects/rocr-runtime/tests/kfdtest/CMakeLists.txt +++ b/projects/rocr-runtime/tests/kfdtest/CMakeLists.txt @@ -33,10 +33,24 @@ set ( CPACK_PACKAGE_FILE_NAME "kfdtest" ) set ( CPACK_PACKAGE_CONTACT "Advanced Micro Devices Inc." ) set ( CPACK_PACKAGE_DESCRIPTION "This package includes kfdtest, the list of excluded tests for each ASIC, and a convenience script to run the test suite" ) set ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "Test suite for ROCK/KFD" ) + +# Make proper version for appending +# Default Value is 99999, setting it first +set(ROCM_VERSION_FOR_PACKAGE "99999") +if(DEFINED ENV{ROCM_LIBPATCH_VERSION}) + set(ROCM_VERSION_FOR_PACKAGE $ENV{ROCM_LIBPATCH_VERSION}) +endif() + set ( CPACK_PACKAGE_VERSION_MAJOR "1" ) set ( CPACK_PACKAGE_VERSION_MINOR "0" ) set ( CPACK_PACKAGE_VERSION_PATCH "0" ) set ( CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface" ) +set ( CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") +set ( CPACK_RPM_FILE_NAME "RPM-DEFAULT") + +set(PACKAGE_VERSION_STR "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}.${ROCM_VERSION_FOR_PACKAGE}") +set(CPACK_PACKAGE_VERSION "${PACKAGE_VERSION_STR}") + ## Define default variable and variables for the optional build target hsakmt-dev set ( SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE STRING "Location of hsakmt source code." )