mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-03-06 17:30:38 +01:00
cmake: add -fno-common when !MSVC
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
b0d418a51b
commit
2a5f1cfda7
1 changed files with 6 additions and 4 deletions
|
|
@ -228,10 +228,12 @@ endif()
|
|||
#
|
||||
# setup warnings
|
||||
#
|
||||
# We're treating -fno-common like a warning: it makes the linker more
|
||||
# strict, because on some systems the linker is *always* this strict
|
||||
string(APPEND CMAKE_C_FLAGS " -fno-common")
|
||||
string(APPEND CMAKE_CXX_FLAGS " -fno-common")
|
||||
if(NOT MSVC)
|
||||
# We're treating -fno-common like a warning: it makes the linker more
|
||||
# strict, because on some systems the linker is *always* this strict
|
||||
string(APPEND CMAKE_C_FLAGS " -fno-common")
|
||||
string(APPEND CMAKE_CXX_FLAGS " -fno-common")
|
||||
endif()
|
||||
|
||||
option(ENABLE_WERROR "Unconditionally make all compiler warnings fatal" OFF)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue