mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 13:23:34 +08:00
fix(uavcan): silence DroneCAN DSDL compiler build warnings (#26757)
Fix Python DeprecationWarning for invalid escape sequence in pyratemp.py and replace deprecated FindPythonInterp CMake module in libuavcan.
This commit is contained in:
@@ -21,7 +21,10 @@ endif ()
|
|||||||
|
|
||||||
project(libuavcan)
|
project(libuavcan)
|
||||||
|
|
||||||
find_package(PythonInterp)
|
if(NOT PYTHON_EXECUTABLE)
|
||||||
|
find_package(Python3 COMPONENTS Interpreter)
|
||||||
|
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
|
||||||
|
endif()
|
||||||
|
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
set(COMPILER_IS_GCC_COMPATIBLE 1)
|
set(COMPILER_IS_GCC_COMPATIBLE 1)
|
||||||
|
|||||||
+1
-1
@@ -278,7 +278,7 @@ def escape(s, format=HTML):
|
|||||||
|
|
||||||
- `NONE`: nothing is replaced
|
- `NONE`: nothing is replaced
|
||||||
- `HTML`: replace &<>'" by &...;
|
- `HTML`: replace &<>'" by &...;
|
||||||
- `LATEX`: replace \#$%&_{}~^
|
- `LATEX`: replace \\#$%&_{}~^
|
||||||
- `MAIL_HEADER`: escape non-ASCII mail-header-contents
|
- `MAIL_HEADER`: escape non-ASCII mail-header-contents
|
||||||
:Returns:
|
:Returns:
|
||||||
the escaped string in unicode
|
the escaped string in unicode
|
||||||
|
|||||||
Reference in New Issue
Block a user