mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 10:46:33 +08:00
drivers/uavcan: silence noisy libuavcan cmake version deprecation warning for now
- keep drivers/uavcannode cmake in sync with drivers/uavcan
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015-2021 PX4 Development Team. All rights reserved.
|
# Copyright (c) 2015-2023 PX4 Development Team. All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
@@ -88,6 +88,7 @@ add_compile_options(
|
|||||||
-Wno-deprecated-copy # TODO: fix
|
-Wno-deprecated-copy # TODO: fix
|
||||||
-Wno-address-of-packed-member
|
-Wno-address-of-packed-member
|
||||||
)
|
)
|
||||||
|
set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE) # silence libuavcan deprecation warning for now (TODO: fix and remove)
|
||||||
add_subdirectory(${LIBUAVCAN_DIR} libuavcan EXCLUDE_FROM_ALL)
|
add_subdirectory(${LIBUAVCAN_DIR} libuavcan EXCLUDE_FROM_ALL)
|
||||||
add_dependencies(uavcan prebuild_targets)
|
add_dependencies(uavcan prebuild_targets)
|
||||||
|
|
||||||
@@ -100,7 +101,7 @@ target_include_directories(uavcan_${UAVCAN_DRIVER}_driver PUBLIC
|
|||||||
|
|
||||||
|
|
||||||
# generated DSDL
|
# generated DSDL
|
||||||
set(DSDLC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dsdl")
|
set(DSDLC_DIR "${PX4_SOURCE_DIR}/src/drivers/uavcan/dsdl")
|
||||||
set(DSDLC_INPUTS
|
set(DSDLC_INPUTS
|
||||||
"${LIBUAVCAN_DIR}/dsdl/ardupilot"
|
"${LIBUAVCAN_DIR}/dsdl/ardupilot"
|
||||||
"${LIBUAVCAN_DIR}/dsdl/com"
|
"${LIBUAVCAN_DIR}/dsdl/com"
|
||||||
@@ -132,6 +133,8 @@ px4_add_module(
|
|||||||
STACK_MAIN 4096
|
STACK_MAIN 4096
|
||||||
COMPILE_FLAGS
|
COMPILE_FLAGS
|
||||||
-Wno-format-security # logmessage.hpp
|
-Wno-format-security # logmessage.hpp
|
||||||
|
#-O0
|
||||||
|
#-DDEBUG_BUILD
|
||||||
INCLUDES
|
INCLUDES
|
||||||
${DSDLC_OUTPUT}
|
${DSDLC_OUTPUT}
|
||||||
${LIBUAVCAN_DIR}/libuavcan/include
|
${LIBUAVCAN_DIR}/libuavcan/include
|
||||||
@@ -170,10 +173,8 @@ px4_add_module(
|
|||||||
sensors/ice_status.cpp
|
sensors/ice_status.cpp
|
||||||
sensors/hygrometer.cpp
|
sensors/hygrometer.cpp
|
||||||
sensors/safety_button.cpp
|
sensors/safety_button.cpp
|
||||||
|
|
||||||
MODULE_CONFIG
|
MODULE_CONFIG
|
||||||
module.yaml
|
module.yaml
|
||||||
|
|
||||||
DEPENDS
|
DEPENDS
|
||||||
px4_uavcan_dsdlc
|
px4_uavcan_dsdlc
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015-2021 PX4 Development Team. All rights reserved.
|
# Copyright (c) 2015-2023 PX4 Development Team. All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
@@ -88,6 +88,7 @@ add_compile_options(
|
|||||||
-Wno-deprecated-copy # TODO: fix
|
-Wno-deprecated-copy # TODO: fix
|
||||||
-Wno-address-of-packed-member
|
-Wno-address-of-packed-member
|
||||||
)
|
)
|
||||||
|
set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE) # silence libuavcan deprecation warning for now (TODO: fix and remove)
|
||||||
add_subdirectory(${LIBUAVCAN_DIR} libuavcan EXCLUDE_FROM_ALL)
|
add_subdirectory(${LIBUAVCAN_DIR} libuavcan EXCLUDE_FROM_ALL)
|
||||||
add_dependencies(uavcan prebuild_targets)
|
add_dependencies(uavcan prebuild_targets)
|
||||||
|
|
||||||
@@ -129,14 +130,15 @@ add_custom_target(px4_uavcan_dsdlc DEPENDS px4_uavcan_dsdlc_run.stamp)
|
|||||||
px4_add_module(
|
px4_add_module(
|
||||||
MODULE drivers__uavcannode
|
MODULE drivers__uavcannode
|
||||||
MAIN uavcannode
|
MAIN uavcannode
|
||||||
|
COMPILE_FLAGS
|
||||||
|
#-O0
|
||||||
|
#-DDEBUG_BUILD
|
||||||
INCLUDES
|
INCLUDES
|
||||||
${DSDLC_OUTPUT}
|
${DSDLC_OUTPUT}
|
||||||
${LIBUAVCAN_DIR}/libuavcan/include
|
${LIBUAVCAN_DIR}/libuavcan/include
|
||||||
${LIBUAVCAN_DIR}/libuavcan/include/dsdlc_generated
|
${LIBUAVCAN_DIR}/libuavcan/include/dsdlc_generated
|
||||||
${LIBUAVCAN_DIR}/libuavcan_drivers/posix/include
|
${LIBUAVCAN_DIR}/libuavcan_drivers/posix/include
|
||||||
${LIBUAVCAN_DIR_DRIVERS}/${UAVCAN_DRIVER}/driver/include
|
${LIBUAVCAN_DIR_DRIVERS}/${UAVCAN_DRIVER}/driver/include
|
||||||
COMPILE_OPTIONS
|
|
||||||
#-O0
|
|
||||||
SRCS
|
SRCS
|
||||||
allocator.hpp
|
allocator.hpp
|
||||||
uavcan_driver.hpp
|
uavcan_driver.hpp
|
||||||
|
|||||||
@@ -42,6 +42,8 @@
|
|||||||
# include <uavcan_kinetis/uavcan_kinetis.hpp>
|
# include <uavcan_kinetis/uavcan_kinetis.hpp>
|
||||||
#elif defined(UAVCAN_STM32_NUTTX)
|
#elif defined(UAVCAN_STM32_NUTTX)
|
||||||
# include <uavcan_stm32/uavcan_stm32.hpp>
|
# include <uavcan_stm32/uavcan_stm32.hpp>
|
||||||
|
#elif defined(UAVCAN_STM32H7_NUTTX)
|
||||||
|
# include <uavcan_stm32h7/uavcan_stm32h7.hpp>
|
||||||
#else
|
#else
|
||||||
# error "Unsupported driver"
|
# error "Unsupported driver"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user