aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/cmake/Modules/UHDVersion.cmake8
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}")
########################################################################