mirror of https://github.com/polybar/polybar.git
build: Remove -Werror
Whenever a new gcc version is released that introduces new warnings, this breaks lots of builds on the user's side. This change pushes the detection of these new warnings a bit back until either a user reports warnings or developers get the new compiler updates. I think this is a good tradeoff since release builds are no longer totally broken as soon as a new compiler version comes out. Travis still uses -Werror because there we actually want builds to fail.
This commit is contained in:
parent
37a7ad9c44
commit
9103d232a5
|
@ -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")
|
||||
|
||||
|
|
|
@ -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}" \
|
||||
|
|
Loading…
Reference in New Issue