Commit 9a823618 authored by Ghislain MARY's avatar Ghislain MARY

Activate -Werror when building with CMake.

parent e3f789cb
......@@ -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 ".")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment