From 437b8eebec50645c54f4fe51aa9a042801585e43 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 6 Jul 2020 15:36:41 +0200 Subject: [PATCH] Pass -Werror on make command line Setting CXXFLAGS=-Werror in the environment wasn't enough, it was still overridden by the empty CXXFLAGS in the makefile. Ideal would be to get rid of the empty flags there, but for now override them on make command line explicitly. --- build/tools/travis-ci.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index 6858ef60d8..adb2ddc8d6 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -67,7 +67,11 @@ case $wxTOOLSET in fi echo 'travis_fold:end:configure' - [ "$wxALLOW_WARNINGS" = 1 ] || export CXXFLAGS='-Werror -Wno-error=cpp' + if [ "$wxALLOW_WARNINGS" != 1 ]; then + error_opts="-Werror -Wno-error=cpp" + wxMAKEFILE_CXXFLAGS="$wxMAKEFILE_CXXFLAGS $error_opts" + wxMAKEFILE_ERROR_CXXFLAGS="CXXFLAGS=$error_opts" + fi if [ -n "$wxMAKEFILE_CXXFLAGS" ]; then wxMAKEFILE_FLAGS="CXXFLAGS=$wxMAKEFILE_CXXFLAGS" @@ -78,7 +82,7 @@ case $wxTOOLSET in echo 'travis_fold:start:building' echo 'Building...' - make -k $wxBUILD_ARGS + make -k $wxBUILD_ARGS $wxMAKEFILE_ERROR_CXXFLAGS echo 'travis_fold:end:building' echo 'travis_fold:start:tests'