diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-10-10 21:37:32 -0700 |
---|---|---|
committer | Marcus Müller <marcus.mueller@ettus.com> | 2018-11-01 15:24:48 +0100 |
commit | 08ed1e66f4cc6824fad043621f3b92e534d335e4 (patch) | |
tree | a4815f5460b0d9b7ea2cc37a2a29eaff17b6c2fd /gr-utils/python/modtool/gr-newmod/cmake/Modules/UseSWIG.cmake | |
parent | 0bb482acbecb722f227e257606589b0395a32706 (diff) |
modtool: Update cmake/Modules files
This imports various fixes that were already applied to cmake/Modules/*
in GNU Radio itself, but weren't forward-ported to gr-newmod.
These fixes include Py3k compatibility.
Diffstat (limited to 'gr-utils/python/modtool/gr-newmod/cmake/Modules/UseSWIG.cmake')
-rw-r--r-- | gr-utils/python/modtool/gr-newmod/cmake/Modules/UseSWIG.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gr-utils/python/modtool/gr-newmod/cmake/Modules/UseSWIG.cmake b/gr-utils/python/modtool/gr-newmod/cmake/Modules/UseSWIG.cmake index b7e3e05dc5..a37cc41ae4 100644 --- a/gr-utils/python/modtool/gr-newmod/cmake/Modules/UseSWIG.cmake +++ b/gr-utils/python/modtool/gr-newmod/cmake/Modules/UseSWIG.cmake @@ -155,6 +155,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) endif(HAVE_WNO_UNUSED_BUT_SET_VARIABLE) get_directory_property(cmake_include_directories INCLUDE_DIRECTORIES) + list(REMOVE_DUPLICATES cmake_include_directories) set(swig_include_dirs) foreach(it ${cmake_include_directories}) set(swig_include_dirs ${swig_include_dirs} "-I${it}") @@ -175,7 +176,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) file(RELATIVE_PATH reldir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib -unique = hashlib.md5('${reldir}${ARGN}').hexdigest()[:5] +unique = hashlib.md5(b'${reldir}${ARGN}').hexdigest()[:5] print(re.sub('\\W', '_', '${name} ${reldir} ' + unique))" OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE ) |