mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Activate -Werror when building with CMake.
This commit is contained in:
parent
e3f789cb8e
commit
9a8236180c
1 changed files with 19 additions and 0 deletions
|
|
@ -107,6 +107,25 @@ endif()
|
|||
add_definitions(-DIN_LINPHONE)
|
||||
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_C_FLAGS "/W3")
|
||||
set(CMAKE_CXX_FLAGS "/W3")
|
||||
else()
|
||||
set(CMAKE_C_FLAGS "-Wall -Wuninitialized -Wdeclaration-after-statement -fno-strict-aliasing -Werror")
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wuninitialized -Werror")
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments -Wno-array-bounds")
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -Wno-array-bounds")
|
||||
endif()
|
||||
if(APPLE)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unknown-warning-option -Wno-tautological-compare -Wno-unused-function")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=unknown-warning-option -Wno-tautological-compare -Wno-unused-function")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
set(GETTEXT_PACKAGE "linphone")
|
||||
if(ENABLE_RELATIVE_PREFIX)
|
||||
set(LINPHONE_DATA_DIR ".")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue