This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 44dfffb198 Fixes defines for the version strings (#9921)
44dfffb198 is described below

commit 44dfffb198d19d76a27464ff4d64078b6d9546e6
Author: Chris McFarlen <[email protected]>
AuthorDate: Tue Jun 27 14:44:31 2023 -0500

    Fixes defines for the version strings (#9921)
    
    * Fixes defines for the version strings
    
    * Use PROJECT_ variables for setting version.  Remove unused libtool 
version variables
    
    ---------
    
    Co-authored-by: Chris McFarlen <[email protected]>
---
 CMakeLists.txt | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5cf1493f0..ef52604a4d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,13 @@
 #######################
 
 cmake_minimum_required(VERSION 3.20)
-project(ats)
+project(ats VERSION 10.0.0)
+
+set(TS_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
+set(TS_VERSION_MINOR ${PROJECT_VERSION_MINOR})
+set(TS_VERSION_MICRO ${PROJECT_VERSION_PATCH})
+set(TS_VERSION_STRING  
${TS_VERSION_MAJOR}.${TS_VERSION_MINOR}.${TS_VERSION_MICRO})
+math(EXPR TS_VERSION_NUMBER "${TS_VERSION_MAJOR} * 1000000 + 
${TS_VERSION_MINOR} * 1000 + ${TS_VERSION_MICRO}")
 
 enable_testing()
 set(CMAKE_CXX_STANDARD 17)
@@ -80,13 +86,6 @@ option(TS_USE_HWLOC "Use hwloc (default OFF)")
 
 set(TS_USE_FAST_SDK ${ENABLE_FAST_SDK})
 
-set(TS_VERSION_MAJOR 10)
-set(TS_VERSION_MINOR 0)
-set(TS_VERSION_MICRO 0)
-set(TS_LIBTOOL_MAJOR ${TS_VERSION_MAJOR}${TS_VERSION_MINOR})
-set(TS_LIBTOOL_VERSION 
${TS_LIBTOOL_MAJOR}:${TS_VERSION_MICRO}:${TS_VERSION_MINOR})
-set(TS_VERSION_STRING TS_VERSION_S)
-set(TS_VERSION_NUMBER TS_VERSION_N)
 
 set(TS_HAS_WCCP ${ENABLE_WCCP})
 set(TS_MAX_NUMBER_EVENT_THREADS ${MAX_EVENT_THREADS})

Reply via email to