aboutsummaryrefslogtreecommitdiffstats
path: root/host/cmake/Modules
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-11-30 09:49:51 -0800
committerMartin Braun <martin.braun@ettus.com>2016-11-30 11:56:05 -0800
commitf583c77fc2dfb1308520164eb1c6260b0b0d8d79 (patch)
tree21145bf22f1ade69b005f713647a3021b8459728 /host/cmake/Modules
parent58668be81d1ec23dc7ce9312bf288ac35206d49e (diff)
downloaduhd-f583c77fc2dfb1308520164eb1c6260b0b0d8d79.tar.gz
uhd-f583c77fc2dfb1308520164eb1c6260b0b0d8d79.tar.bz2
uhd-f583c77fc2dfb1308520164eb1c6260b0b0d8d79.zip
cmake: Fixed version num depadding
Diffstat (limited to 'host/cmake/Modules')
-rw-r--r--host/cmake/Modules/UHDVersion.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake
index 26dbfbb06..7c18f9312 100644
--- a/host/cmake/Modules/UHDVersion.cmake
+++ b/host/cmake/Modules/UHDVersion.cmake
@@ -79,7 +79,7 @@ ENDIF(GIT_FOUND)
FUNCTION(DEPAD_NUM input_num output_num)
EXECUTE_PROCESS(
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMAND ${PYTHON_EXECUTABLE} -c "print(int('${input_num}'))"
+ COMMAND ${PYTHON_EXECUTABLE} -c "print(\"${input_num}\".lstrip(\"0\") or 0)"
OUTPUT_VARIABLE depadded_num OUTPUT_STRIP_TRAILING_WHITESPACE
)
SET(${output_num} ${depadded_num} PARENT_SCOPE)