From 032d5e5c6bd76cb2f8af9ca1b1d1798fccd70964 Mon Sep 17 00:00:00 2001 From: akolliasAMD <99202231+akolliasAMD@users.noreply.github.com> Date: Wed, 28 May 2025 14:48:20 -0600 Subject: [PATCH] updated version and made the header its only source of truth (#144) * updated version and made it only source of truth * bumped Version number [ROCm/rocshmem commit: ca5fdd4718380d1e3e4aa863261fe951d84ba24e] --- projects/rocshmem/CMakeLists.txt | 13 +++++++++++-- projects/rocshmem/include/rocshmem/rocshmem.hpp | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/projects/rocshmem/CMakeLists.txt b/projects/rocshmem/CMakeLists.txt index 1941f3453e..8d39020f0d 100644 --- a/projects/rocshmem/CMakeLists.txt +++ b/projects/rocshmem/CMakeLists.txt @@ -112,8 +112,17 @@ include(ROCMCreatePackage) include(ROCMInstallTargets) include(ROCMCheckTargetIds) -rocm_setup_version(VERSION 2.0.0) -project(rocshmem VERSION 2.0.0 LANGUAGES CXX) +## Setup VERSION +file(READ include/rocshmem/rocshmem.hpp header_text) +if("${header_text}" MATCHES "constexpr char VERSION\\[\\] *= \"([0-9]+)\\.([0-9]+)\\.([0-9]+)\";") + set(VERSION_STRING ${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}) +else() + message(FATAL_ERROR "Failed to parse Version") +endif() +message(STATUS "rocSHMEM Version: " "${VERSION_STRING}") + +rocm_setup_version(VERSION ${VERSION_STRING}) +project(rocshmem VERSION ${VERSION_STRING} LANGUAGES CXX) ############################################################################### # CREATE ROCSHMEM LIBRARY diff --git a/projects/rocshmem/include/rocshmem/rocshmem.hpp b/projects/rocshmem/include/rocshmem/rocshmem.hpp index ad150e0b53..be4de8cf16 100644 --- a/projects/rocshmem/include/rocshmem/rocshmem.hpp +++ b/projects/rocshmem/include/rocshmem/rocshmem.hpp @@ -52,7 +52,7 @@ namespace rocshmem { -constexpr char VERSION[] = "2.0.0"; +constexpr char VERSION[] = "3.0.0"; /****************************************************************************** **************************** HOST INTERFACE **********************************