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

Stricter compilation options.

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