diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2015-02-26 13:50:39 -0800 |
---|---|---|
committer | Ashish Chaudhari <ashish@ettus.com> | 2015-02-26 13:50:39 -0800 |
commit | e994fad15798e7f2f7a7c34f20bbdee0e6d5ed1a (patch) | |
tree | ea51a231b2a1dffe79dbbcb9bb8785d11e7f1296 /host/cmake | |
parent | 566dbc2b5d0751167c9d868743dbebfff4d22afe (diff) | |
parent | 963dcaa6a75862aec9ee4924dd88fa0901b39934 (diff) | |
download | uhd-e994fad15798e7f2f7a7c34f20bbdee0e6d5ed1a.tar.gz uhd-e994fad15798e7f2f7a7c34f20bbdee0e6d5ed1a.tar.bz2 uhd-e994fad15798e7f2f7a7c34f20bbdee0e6d5ed1a.zip |
Merge branch 'maint'
Diffstat (limited to 'host/cmake')
-rw-r--r-- | host/cmake/Modules/UHDVersion.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake index 0fb8c0af3..014943b53 100644 --- a/host/cmake/Modules/UHDVersion.cmake +++ b/host/cmake/Modules/UHDVersion.cmake @@ -38,7 +38,7 @@ SET(UHD_VERSION_DEVEL FALSE) FUNCTION(DEPAD_NUM input_num output_num) EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${PYTHON_EXECUTABLE} -c "print int('${input_num}') if isinstance('${input_num}', (int, long)) else '${input_num}'" + COMMAND ${PYTHON_EXECUTABLE} -c "print int('${input_num}')" OUTPUT_VARIABLE depadded_num OUTPUT_STRIP_TRAILING_WHITESPACE ) SET(${output_num} ${depadded_num} PARENT_SCOPE) @@ -46,7 +46,11 @@ ENDFUNCTION(DEPAD_NUM) DEPAD_NUM(${UHD_VERSION_MAJOR} TRIMMED_VERSION_MAJOR) DEPAD_NUM(${UHD_VERSION_MINOR} TRIMMED_VERSION_MINOR) -DEPAD_NUM(${UHD_VERSION_PATCH} TRIMMED_VERSION_PATCH) +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}") ######################################################################## |