Skip to content

Commit

Permalink
cmake: Suppress invalid escape sequence warnings with Python 3.12
Browse files Browse the repository at this point in the history
Signed-off-by: Ron Economos <[email protected]>
  • Loading branch information
drmpeg committed Jun 25, 2024
1 parent 8a015bb commit b2eddf3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/Modules/VolkPython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function(VOLK_UNIQUE_TARGET desc)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib
unique = hashlib.sha256(b'${reldir}${ARGN}').hexdigest()[:5]
print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))"
print(re.sub(r'\\W', '_', '${desc} ${reldir} ' + unique))"
OUTPUT_VARIABLE _target
OUTPUT_STRIP_TRAILING_WHITESPACE)
add_custom_target(${_target} ALL DEPENDS ${ARGN})
Expand Down
2 changes: 1 addition & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ macro(check_arch arch_name)
#make the have_flag have nice alphanum chars (just for looks/not necessary)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c
"import re; print(re.sub('\\W', '_', '${have_flag}'))"
"import re; print(re.sub(r'\\W', '_', '${have_flag}'))"
OUTPUT_VARIABLE have_flag
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(VOLK_FLAG_CHECK_FLAGS)
Expand Down

0 comments on commit b2eddf3

Please sign in to comment.