diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2015-07-07 15:41:50 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-07-14 14:51:32 -0700 |
commit | 8057c17458bd32856842299df58662e784423d8f (patch) | |
tree | d9edfe04cd3df7f994328ab76dc6840c6bdedc79 /host/cmake | |
parent | 4b1034b29e57a0b405fc89de4602819a4b8cc970 (diff) | |
download | uhd-8057c17458bd32856842299df58662e784423d8f.tar.gz uhd-8057c17458bd32856842299df58662e784423d8f.tar.bz2 uhd-8057c17458bd32856842299df58662e784423d8f.zip |
build: Python 3 compatibility for build scripts
Diffstat (limited to 'host/cmake')
-rw-r--r-- | host/cmake/Modules/UHDVersion.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake index aefe516d6..b8b256834 100644 --- a/host/cmake/Modules/UHDVersion.cmake +++ b/host/cmake/Modules/UHDVersion.cmake @@ -38,7 +38,7 @@ SET(UHD_VERSION_DEVEL TRUE) 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(int('${input_num}'))" OUTPUT_VARIABLE depadded_num OUTPUT_STRIP_TRAILING_WHITESPACE ) SET(${output_num} ${depadded_num} PARENT_SCOPE) @@ -69,12 +69,12 @@ EXECUTE_PROCESS( IF(_git_describe_result EQUAL 0) EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMAND ${PYTHON_EXECUTABLE} -c "print '${_git_describe}'.split('-')[-2]" + COMMAND ${PYTHON_EXECUTABLE} -c "print('${_git_describe}'.split('-')[-2])" OUTPUT_VARIABLE UHD_GIT_COUNT OUTPUT_STRIP_TRAILING_WHITESPACE ) EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMAND ${PYTHON_EXECUTABLE} -c "print '${_git_describe}'.split('-')[-1]" + COMMAND ${PYTHON_EXECUTABLE} -c "print('${_git_describe}'.split('-')[-1])" OUTPUT_VARIABLE UHD_GIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE ) ENDIF() |