mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
When compiling upm for target Raspberry Pi (and probably others),
warning messages about unused result occur. This commit enables to remove the messages uding the option -DWUNUSED=on which makes a cleaner log Signed-off-by: g-vidal <gerard.vidal@ens-lyon.fr>
This commit is contained in:
parent
ad15b27cb1
commit
543fd26dce
@ -15,6 +15,7 @@ option (RPM "Generate RPM using CPack" OFF)
|
||||
option (NPM "Generate NPM/GYP tarballs" OFF)
|
||||
option (BUILDTESTS "Generate check-ups for upm" OFF)
|
||||
option (WERROR "Make all warnings into errors." ON)
|
||||
option (WUNUSED "Remove warnings if return value unused" OFF)
|
||||
|
||||
# Warn if building in source root
|
||||
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||
@ -104,6 +105,13 @@ if (WERROR)
|
||||
message (STATUS "Warnings as errors enabled (-Werror), disable with -DWERROR=off")
|
||||
endif (WERROR)
|
||||
|
||||
# Remove Warnings for "unused return" ?
|
||||
if (WUNUSED)
|
||||
list (APPEND C_CXX_WARNING_FLAGS -Wno-unused-result)
|
||||
message (STATUS "Warnings for unused-result enabled, disable with -DWUNUSED=on")
|
||||
endif (WUNUSED)
|
||||
|
||||
|
||||
# Set C compiler warning flags at top-level scope and emit a warning about
|
||||
# unsupported flags
|
||||
upm_add_compile_flags(C ${C_CXX_WARNING_FLAGS}
|
||||
|
Loading…
x
Reference in New Issue
Block a user