diff options
-rw-r--r-- | host/CMakeLists.txt | 2 | ||||
-rw-r--r-- | host/Modules/UHDVersion.cmake | 14 | ||||
-rw-r--r-- | host/lib/constants.hpp.in | 4 |
3 files changed, 11 insertions, 9 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index db100129f..244793b9e 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -211,5 +211,5 @@ ADD_SUBDIRECTORY(usrp_e_utils) # Print Summary ######################################################################## UHD_PRINT_COMPONENT_SUMMARY() -MESSAGE(STATUS "Building version: ${CPACK_PACKAGE_VERSION}") +MESSAGE(STATUS "Building version: ${CPACK_PACKAGE_VERSION}-${UHD_BUILD_INFO}") MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}") diff --git a/host/Modules/UHDVersion.cmake b/host/Modules/UHDVersion.cmake index dbc39b5a9..78bf7f690 100644 --- a/host/Modules/UHDVersion.cmake +++ b/host/Modules/UHDVersion.cmake @@ -33,12 +33,14 @@ SET(UHD_VERSION_PATCH 000) # Version information discovery through git log ######################################################################## IF(UHD_RELEASE_MODE) - SET(UHD_VERSION_DISCOVERY FALSE) + SET(UHD_BUILD_INFO_DISCOVERY FALSE) + SET(UHD_BUILD_INFO "release") ELSE() - SET(UHD_VERSION_DISCOVERY GIT_FOUND) + SET(UHD_BUILD_INFO_DISCOVERY GIT_FOUND) + SET(UHD_BUILD_INFO "unknown") ENDIF() -IF(UHD_VERSION_DISCOVERY) +IF(UHD_BUILD_INFO_DISCOVERY) #grab the git log entry for the current head EXECUTE_PROCESS( @@ -59,7 +61,6 @@ IF(UHD_VERSION_DISCOVERY) COMMAND ${PYTHON_EXECUTABLE} -c "import time; print time.strftime('%Y%m%d%H%M%S', time.gmtime(${_git_timestamp}))" OUTPUT_VARIABLE _git_date OUTPUT_STRIP_TRAILING_WHITESPACE ) - #SET(UHD_VERSION_MINOR ${_git_date}) #grab the git ref id for the current head EXECUTE_PROCESS( @@ -67,8 +68,9 @@ IF(UHD_VERSION_DISCOVERY) COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD OUTPUT_VARIABLE _git_rev OUTPUT_STRIP_TRAILING_WHITESPACE ) - SET(UHD_VERSION_PATCH ${_git_rev}) -ENDIF(UHD_VERSION_DISCOVERY) + + SET(UHD_BUILD_INFO ${_git_rev}) +ENDIF(UHD_BUILD_INFO_DISCOVERY) ######################################################################## SET(UHD_VERSION "${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}") diff --git a/host/lib/constants.hpp.in b/host/lib/constants.hpp.in index 4aedb6d4a..d62dda1cb 100644 --- a/host/lib/constants.hpp.in +++ b/host/lib/constants.hpp.in @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 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 @@ -19,7 +19,7 @@ #define INCLUDED_LIBUHD_CONSTANTS_HPP //these should be pre-processor macros to avoid static initialization issues -#define UHD_VERSION_STRING "@CPACK_PACKAGE_VERSION@" +#define UHD_VERSION_STRING "@UHD_VERSION@-@UHD_BUILD_INFO@" #define LOCAL_PKG_DATA_DIR "@LOCAL_PKG_DATA_DIR@" #define INSTALLER_PKG_DATA_DIR "@INSTALLER_PKG_DATA_DIR@" |