Commit 57dfcd9a authored by Ghislain MARY's avatar Ghislain MARY

Stricter compilation options.

parent 3fe5d85e
...@@ -71,15 +71,15 @@ include_directories( ...@@ -71,15 +71,15 @@ include_directories(
add_definitions(-DHAVE_CONFIG_H) add_definitions(-DHAVE_CONFIG_H)
if(NOT MSVC) if(NOT MSVC)
add_definitions(-Wall -Wno-error=unknown-pragmas) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-error=unknown-pragmas")
if (CMAKE_C_COMPILER_ID STREQUAL "Clang") if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_definitions("-Wno-error=unknown-warning-option") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unknown-warning-option")
if (NOT IOS) if(NOT IOS)
add_definitions("-Werror") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wextra")
endif() endif()
elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU") elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
add_definitions("-Werror -Wno-error=pragmas") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wextra -Wno-error=pragmas")
endif() endif()
endif(NOT MSVC) endif()
add_subdirectory(src) add_subdirectory(src)
...@@ -66,7 +66,7 @@ if test x$ac_cv_c_bigendian = xyes ; then ...@@ -66,7 +66,7 @@ if test x$ac_cv_c_bigendian = xyes ; then
fi fi
if test $GCC = yes && test $wall_werror = yes; then if test $GCC = yes && test $wall_werror = yes; then
CFLAGS="$CFLAGS -Werror " CFLAGS="$CFLAGS -Werror -Wextra "
fi fi
if test $GCC = yes ; then if test $GCC = yes ; then
......
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