diff --git a/cmake/01-core.cmake b/cmake/01-core.cmake index 2bc6e91a..50993ab7 100644 --- a/cmake/01-core.cmake +++ b/cmake/01-core.cmake @@ -21,14 +21,7 @@ string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER) # Compiler flags set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") -if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") - # there's no way to modify the code to avoid this warning, so we must - # suppress it if we use -Werror - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-noexcept-type") -endif() -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic") if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") # Need dprintf() for FreeBSD 11.1 and older @@ -44,7 +37,6 @@ if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-zero-length-array") endif() -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wno-error") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g2") diff --git a/common/travis/configure.sh b/common/travis/configure.sh index bd3d22b1..b67d78bd 100755 --- a/common/travis/configure.sh +++ b/common/travis/configure.sh @@ -25,7 +25,7 @@ fi cmake \ -DCMAKE_CXX_COMPILER="${CXX}" \ - -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ + -DCMAKE_CXX_FLAGS="${CXXFLAGS} -Werror" \ -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \ -DBUILD_TESTS:BOOL="${BUILD_TESTS:-OFF}" \ -DBUILD_DOC:BOOL="${BUILD_DOC:-OFF}" \