mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
Merge b6bd7fc587011ece0e1cc985cc11894930570be2 into 8a617aa9044cbe5731b32d79437bd6a9ffcf2602
This commit is contained in:
commit
8c76f840f9
@ -15,6 +15,7 @@ option (RPM "Generate RPM using CPack" OFF)
|
|||||||
option (NPM "Generate NPM/GYP tarballs" OFF)
|
option (NPM "Generate NPM/GYP tarballs" OFF)
|
||||||
option (BUILDTESTS "Generate check-ups for upm" OFF)
|
option (BUILDTESTS "Generate check-ups for upm" OFF)
|
||||||
option (WERROR "Make all warnings into errors." ON)
|
option (WERROR "Make all warnings into errors." ON)
|
||||||
|
option (WNO-UNUSED "Remove warnings if return value unused, default is OFF [warnings are printed]" OFF)
|
||||||
|
|
||||||
# Warn if building in source root
|
# Warn if building in source root
|
||||||
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
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")
|
message (STATUS "Warnings as errors enabled (-Werror), disable with -DWERROR=off")
|
||||||
endif (WERROR)
|
endif (WERROR)
|
||||||
|
|
||||||
|
# Remove Warnings for "unused return" ?
|
||||||
|
if (WNO-UNUSED)
|
||||||
|
list (APPEND C_CXX_WARNING_FLAGS -Wno-unused-result)
|
||||||
|
message (STATUS "Remove compiler warnings regarding unused return values. To remove warnings put the filter on with -DWNO-UNUSED=on")
|
||||||
|
endif (WNO-UNUSED)
|
||||||
|
|
||||||
|
|
||||||
# Set C compiler warning flags at top-level scope and emit a warning about
|
# Set C compiler warning flags at top-level scope and emit a warning about
|
||||||
# unsupported flags
|
# unsupported flags
|
||||||
upm_add_compile_flags(C ${C_CXX_WARNING_FLAGS}
|
upm_add_compile_flags(C ${C_CXX_WARNING_FLAGS}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user