diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2015-03-17 13:52:29 -0700 |
---|---|---|
committer | Ashish Chaudhari <ashish@ettus.com> | 2015-03-17 13:52:29 -0700 |
commit | 6a34824ad10eaa2d2b642b959f278f6c4e326d6d (patch) | |
tree | 1aa582ee8e5cef716b59ec4deb3a8e5f4f532929 /host/cmake/Modules/UHDVersion.cmake | |
parent | 5682321efa26bb97f5d0c37d8e9921fc11a9b923 (diff) | |
parent | 306b5243e12af0db493856ad8397abac9835db0c (diff) | |
download | uhd-6a34824ad10eaa2d2b642b959f278f6c4e326d6d.tar.gz uhd-6a34824ad10eaa2d2b642b959f278f6c4e326d6d.tar.bz2 uhd-6a34824ad10eaa2d2b642b959f278f6c4e326d6d.zip |
Merge branch 'master' into ashish/vivado
Diffstat (limited to 'host/cmake/Modules/UHDVersion.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}") ######################################################################## |