NuttX add compiler dependent: disable no-stringop-truncation

This commit is contained in:
David Sidrane 2020-06-18 15:58:40 -07:00 committed by Daniel Agar
parent 4d64065422
commit c49c767d78
2 changed files with 5 additions and 1 deletions

View File

@ -156,6 +156,9 @@ add_custom_command(
)
add_custom_target(nuttx_copy_config_dir_target DEPENDS ${PX4_BINARY_DIR}/NuttX/nuttx_copy_config_dir.stamp)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.3)
set(CMAKE_C_COMP_DEP_FLAGS -Wno-stringop-truncation)
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Make.defs.in ${NUTTX_DIR}/Make.defs)

View File

@ -115,7 +115,8 @@ CFLAGS = $(ARCHINCLUDES) \
-Wno-nonnull-compare \
-Wno-old-style-declaration \
-Wno-sign-compare \
-Wno-type-limits
-Wno-type-limits \
${CMAKE_C_COMP_DEP_FLAGS}
CXXFLAGS = $(ARCHXXINCLUDES) \
-std=c++14 \