PX4 add compiler dependent: disable no-stringop-truncation

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

View File

@ -89,6 +89,7 @@ function(px4_add_common_flags)
-Wno-missing-field-initializers
-Wno-missing-include-dirs # TODO: fix and enable
-Wno-unused-parameter
)
# compiler specific flags
@ -117,6 +118,10 @@ function(px4_add_common_flags)
add_compile_options(-fdiagnostics-color=always)
endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.3)
add_compile_options(-Wno-stringop-truncation)
endif()
add_compile_options(
-fno-builtin-printf
-fno-strength-reduce