From 0d07112d6da72d8e0c896c8c1b5871d5f86e8511 Mon Sep 17 00:00:00 2001 From: Ammar ELWazir Date: Thu, 17 Aug 2023 17:51:45 +0000 Subject: [PATCH] SWDEV-407953: Adding Patch Version from ROCm Standard Option ROCm Packaging uses ROCM_PATCH_VERSION as a standard option to add the patch version which determines the rocm release for different libraries versions Change-Id: If335f9095b069edd4ab6c29a4eb7349552fd47f3 [ROCm/rocprofiler commit: c15ad661fabff42d6818a200cd2dfac5fb218c0f] --- projects/rocprofiler/CMakeLists.txt | 5 +++++ projects/rocprofiler/src/api/CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/rocprofiler/CMakeLists.txt b/projects/rocprofiler/CMakeLists.txt index 2b96f54e7d..4ebf937c42 100644 --- a/projects/rocprofiler/CMakeLists.txt +++ b/projects/rocprofiler/CMakeLists.txt @@ -33,6 +33,11 @@ set(ROCPROFILER_TARGET "${ROCPROFILER_NAME}64") set(ROCPROFILER_LIBRARY "lib${ROCPROFILER_TARGET}") project(rocprofiler VERSION 2.0.0) +if(${ROCM_PATCH_VERSION}) + set(PROJECT_VERSION_PATCH ${ROCM_PATCH_VERSION}) + set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") +endif() + include(GNUInstallDirs) # set default ROCM_PATH diff --git a/projects/rocprofiler/src/api/CMakeLists.txt b/projects/rocprofiler/src/api/CMakeLists.txt index ee38ca75c8..7ba1c9632d 100644 --- a/projects/rocprofiler/src/api/CMakeLists.txt +++ b/projects/rocprofiler/src/api/CMakeLists.txt @@ -229,7 +229,7 @@ set_target_properties( ${ROCPROFILER_TARGET} PROPERTIES CXX_VISIBILITY_PRESET hidden LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib - VERSION 1.0.0 + VERSION 1.0.${PROJECT_VERSION_PATCH} SOVERSION 1) # As ROCR hsa_api_trace header file is not usable unless AMD_INTERNAL_BUILD is defined