aboutsummaryrefslogtreecommitdiffstats
path: root/host/cmake/Modules
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2016-06-14 10:22:10 -0700
committerNicholas Corgan <nick.corgan@ettus.com>2016-06-14 16:20:46 -0700
commit0b2f56bdd6b0a7dd52f795663f921061af192e6a (patch)
tree3983c755b6e40851afbd03c9891422978456a975 /host/cmake/Modules
parent8cde538c6df89d9e7b2bdd7b8def9044f638fb60 (diff)
downloaduhd-0b2f56bdd6b0a7dd52f795663f921061af192e6a.tar.gz
uhd-0b2f56bdd6b0a7dd52f795663f921061af192e6a.tar.bz2
uhd-0b2f56bdd6b0a7dd52f795663f921061af192e6a.zip
Changing UHD's versioning system
* Version numbers now Major.API.ABI.Patch
Diffstat (limited to 'host/cmake/Modules')
-rw-r--r--host/cmake/Modules/UHDGlobalDefs.cmake6
-rw-r--r--host/cmake/Modules/UHDVersion.cmake21
2 files changed, 15 insertions, 12 deletions
diff --git a/host/cmake/Modules/UHDGlobalDefs.cmake b/host/cmake/Modules/UHDGlobalDefs.cmake
index 58c0b1287..48d0c34cf 100644
--- a/host/cmake/Modules/UHDGlobalDefs.cmake
+++ b/host/cmake/Modules/UHDGlobalDefs.cmake
@@ -1,5 +1,5 @@
#
-# Copyright 2015 Ettus Research LLC
+# Copyright 2015,2016 Ettus Research LLC
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,9 +24,9 @@ CHECK_CXX_SYMBOL_EXISTS(log2 cmath HAVE_LOG2)
## Macros for the version number
IF(UHD_VERSION_DEVEL)
- MATH(EXPR UHD_VERSION_ADDED "10000 * ${TRIMMED_VERSION_MAJOR} + 100 * ${TRIMMED_VERSION_MINOR} + 99")
+ MATH(EXPR UHD_VERSION_ADDED "1000000 * ${TRIMMED_VERSION_MAJOR} + 10000 * ${TRIMMED_VERSION_API} + 100 * ${TRIMMED_VERSION_ABI} + 99")
ELSE()
- MATH(EXPR UHD_VERSION_ADDED "10000 * ${TRIMMED_VERSION_MAJOR} + 100 * ${TRIMMED_VERSION_MINOR} + ${TRIMMED_VERSION_PATCH}")
+ MATH(EXPR UHD_VERSION_ADDED "1000000 * ${TRIMMED_VERSION_MAJOR} + 10000 * ${TRIMMED_VERSION_API} + 100 * ${TRIMMED_VERSION_ABI} + ${TRIMMED_VERSION_PATCH}")
ENDIF(UHD_VERSION_DEVEL)
ADD_DEFINITIONS(-DUHD_VERSION=${UHD_VERSION_ADDED})
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake
index 2b105585b..bb1eed132 100644
--- a/host/cmake/Modules/UHDVersion.cmake
+++ b/host/cmake/Modules/UHDVersion.cmake
@@ -1,5 +1,5 @@
#
-# Copyright 2010-2014 Ettus Research LLC
+# Copyright 2010-2014,2016 Ettus Research LLC
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,13 +21,15 @@ FIND_PACKAGE(Git QUIET)
########################################################################
# Setup Version Numbers
-# - increment major on api compatibility changes
-# - increment minor on feature-level changes
-# - increment patch on for bug fixes and docs
+# - Increment major on large-scale library changes
+# - Increment API on API changes
+# - Increment ABI on ABI changes
+# - Increment patch for bugfixes and docs
# - set UHD_VERSION_DEVEL to true for master and development branches
########################################################################
SET(UHD_VERSION_MAJOR 003)
-SET(UHD_VERSION_MINOR 010)
+SET(UHD_VERSION_API 010)
+SET(UHD_VERSION_ABI 000)
SET(UHD_VERSION_PATCH git)
SET(UHD_VERSION_DEVEL TRUE)
@@ -83,13 +85,14 @@ FUNCTION(DEPAD_NUM input_num output_num)
ENDFUNCTION(DEPAD_NUM)
DEPAD_NUM(${UHD_VERSION_MAJOR} TRIMMED_VERSION_MAJOR)
-DEPAD_NUM(${UHD_VERSION_MINOR} TRIMMED_VERSION_MINOR)
+DEPAD_NUM(${UHD_VERSION_API} TRIMMED_VERSION_API)
+DEPAD_NUM(${UHD_VERSION_ABI} TRIMMED_VERSION_ABI)
IF(UHD_VERSION_DEVEL)
SET(TRIMMED_VERSION_PATCH ${UHD_VERSION_PATCH})
ELSE(UHD_VERSION_DEVEL)
DEPAD_NUM(${UHD_VERSION_PATCH} TRIMMED_VERSION_PATCH)
ENDIF(UHD_VERSION_DEVEL)
-SET(TRIMMED_UHD_VERSION "${TRIMMED_VERSION_MAJOR}.${TRIMMED_VERSION_MINOR}.${TRIMMED_VERSION_PATCH}")
+SET(TRIMMED_UHD_VERSION "${TRIMMED_VERSION_MAJOR}.${TRIMMED_VERSION_API}.${TRIMMED_VERSION_ABI}.${TRIMMED_VERSION_PATCH}")
########################################################################
# Version information discovery through git log
@@ -150,7 +153,7 @@ ENDIF()
########################################################################
IF(TRIM_UHD_VERSION STREQUAL "True")
- SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}-${UHD_GIT_HASH}")
+ SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_API}.${UHD_VERSION_ABI}.${UHD_VERSION_PATCH}-${UHD_GIT_HASH}")
ELSE()
- SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}-${UHD_GIT_COUNT}-${UHD_GIT_HASH}")
+ SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_API}.${UHD_VERSION_ABI}.${UHD_VERSION_PATCH}-${UHD_GIT_COUNT}-${UHD_GIT_HASH}")
ENDIF()