Fail CI build when not allowed warnings are present

Put -Wno-error after -Wall to make it work properly for clang.
cherry-pick-2c0f29ea
elsid 3 years ago
parent a8c16071dc
commit 1b1deeb59b
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

@ -14,6 +14,12 @@ if [[ "${BUILD_TESTS_ONLY}" ]]; then
BUILD_BENCHMARKS=ON
fi
CXX_FLAGS='-Werror -Wno-error=deprecated-declarations -Wno-error=nonnull -Wno-error=deprecated-copy'
if [[ "${CXX}" == 'clang++' ]]; then
CXX_FLAGS="${CXX_FLAGS} -Wno-error=unused-lambda-capture -Wno-error=gnu-zero-variadic-macro-arguments"
fi
declare -a CMAKE_CONF_OPTS=(
-DCMAKE_C_COMPILER="${CC:-/usr/bin/cc}"
-DCMAKE_CXX_COMPILER="${CXX:-/usr/bin/c++}"
@ -24,6 +30,8 @@ declare -a CMAKE_CONF_OPTS=(
-DBUILD_SHARED_LIBS=OFF
-DUSE_SYSTEM_TINYXML=ON
-DCMAKE_INSTALL_PREFIX=install
-DCMAKE_C_FLAGS='-Werror'
-DCMAKE_CXX_FLAGS="${CXX_FLAGS}"
)
if [[ $CI_OPENMW_USE_STATIC_DEPS ]]; then

@ -512,7 +512,7 @@ endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wno-unused-parameter -pedantic -Wno-long-long")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wundef -Wno-unused-parameter -pedantic -Wno-long-long ${CMAKE_CXX_FLAGS}")
add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS=ON )
if (APPLE)

Loading…
Cancel
Save