From f583c77fc2dfb1308520164eb1c6260b0b0d8d79 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 30 Nov 2016 09:49:51 -0800 Subject: cmake: Fixed version num depadding --- host/cmake/Modules/UHDVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/cmake/Modules') 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) -- cgit v1.2.3