1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Use sha256 instead of sha1 for hash algorithm

This commit is contained in:
Carles Fernandez 2019-11-17 21:01:03 +01:00
parent 815a910619
commit 17fd01ee3f
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -133,7 +133,7 @@ file(TO_CMAKE_PATH ${VOLK_PYTHON_DIR} VOLK_PYTHON_DIR)
function(VOLK_UNIQUE_TARGET desc) function(VOLK_UNIQUE_TARGET desc)
file(RELATIVE_PATH reldir ${PROJECT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) file(RELATIVE_PATH reldir ${PROJECT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib
unique = hashlib.sha1(b'${reldir}${ARGN}').hexdigest()[:5] unique = hashlib.sha256(b'${reldir}${ARGN}').hexdigest()[:5]
print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))" print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))"
OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE)
add_custom_target(${_target} ALL DEPENDS ${ARGN}) add_custom_target(${_target} ALL DEPENDS ${ARGN})