Browse Source

do not compile with -Werror by default

but run travis tests with -Werror

(a bit hacky, using AM_CFLAGS, because otherwise configure fails,
or all other default flags would have to be repeated to make)
pull/490/head
Pierce Lopez 6 years ago
parent
commit
396c5857f6
4 changed files with 3 additions and 6 deletions
  1. +1
    -1
      .travis.yml
  2. +0
    -3
      CMakeLists.txt
  3. +1
    -0
      ChangeLog
  4. +1
    -2
      configure.ac

+ 1
- 1
.travis.yml View File

@@ -25,7 +25,7 @@ before_script:
- ./configure
script:
- make
- make AM_CFLAGS="-Werror"
after_success:
- make check


+ 0
- 3
CMakeLists.txt View File

@@ -168,9 +168,6 @@ message(STATUS "Written ${PROJECT_BINARY_DIR}/json_config.h")

if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")
# There's a catch here.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")

add_definitions(-D_GNU_SOURCE)
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /DEBUG")


+ 1
- 0
ChangeLog View File

@@ -11,6 +11,7 @@ Deprecated and removed features:

Build changes:
--------------
* Do not compile with -Werror by default

0.13.1 (up to commit 0f814e5, 2018/03/04)
=========================================


+ 1
- 2
configure.ac View File

@@ -165,8 +165,7 @@ AS_IF([test "x$enable_Bsymbolic" = "xcheck"],
AS_IF([test "x$enable_Bsymbolic" = "xyes"], [JSON_BSYMBOLIC_LDFLAGS=-Wl[,]-Bsymbolic-functions])
AC_SUBST(JSON_BSYMBOLIC_LDFLAGS)

AX_APPEND_COMPILE_FLAGS([-Wall -Werror -Wcast-qual -Wno-error=deprecated-declarations])
AX_APPEND_COMPILE_FLAGS([-Wextra -Wwrite-string -Wno-unused-parameter])
AX_APPEND_COMPILE_FLAGS([-Wall -Wextra -Wcast-qual -Wwrite-strings -Wno-unused-parameter])
AX_APPEND_COMPILE_FLAGS([-D_GNU_SOURCE])

AC_LANG_PUSH([C])


Loading…
Cancel
Save