diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cc8783c05..eab20cf87 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -100,6 +100,11 @@ jobs: # Env var name DISTCHECK_CONFIGURE_FLAGS must be used, see #1881 and #1883 run: | echo "DISTCHECK_CONFIGURE_FLAGS=${{ matrix.configure-args }}" >> $GITHUB_ENV + - name: Set additional Linux configure arguments + if: runner.os == 'Linux' + # Silence all deprecated declarations on Linux due to auto_ptr making the build log too long + run: | + echo "DISTCHECK_CONFIGURE_FLAGS=$DISTCHECK_CONFIGURE_FLAGS CPPFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV - name: Print configure command run: echo "./configure $DISTCHECK_CONFIGURE_FLAGS" - name: Configure diff --git a/.travis-ci.sh b/.travis-ci.sh index 405b755d2..94a93939a 100755 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -294,7 +294,7 @@ else # Env var name DISTCHECK_CONFIGURE_FLAGS must be used, see #1881 and #1883 if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then # Silence all deprecated declarations on Linux due to auto_ptr making the build log too long - export DISTCHECK_CONFIGURE_FLAGS='--enable-rdm-tests --enable-java-libs --enable-ja-rule --enable-e133' + export DISTCHECK_CONFIGURE_FLAGS='--enable-rdm-tests --enable-java-libs --enable-ja-rule --enable-e133 CPPFLAGS=-Wno-deprecated-declarations' else export DISTCHECK_CONFIGURE_FLAGS='--enable-rdm-tests --enable-java-libs --enable-ja-rule --enable-e133' fi diff --git a/Makefile.am b/Makefile.am index a54402864..3c14437f3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -65,10 +65,19 @@ if ! USING_WIN32 if FATAL_WARNINGS COMMON_CXXFLAGS += -Werror COMMON_PROTOBUF_CXXFLAGS += -Werror -Wno-error=unused-parameter \ + -Wno-error=deprecated-declarations \ -Wno-error=sign-compare \ -Wno-error=ignored-qualifiers COMMON_TESTING_FLAGS += -Werror - COMMON_TESTING_PROTOBUF_FLAGS += -Werror -Wno-error=unused-parameter + COMMON_TESTING_PROTOBUF_FLAGS += -Werror -Wno-error=unused-parameter \ + -Wno-error=deprecated-declarations + +if GNU_PLUS_PLUS_11_DEPRECATIONS + # We have to use gnu++11 for some reason, so stop it complaining about + # auto_ptr + COMMON_CXXFLAGS += -Wno-error=deprecated-declarations + COMMON_TESTING_FLAGS += -Wno-error=deprecated-declarations +endif endif endif diff --git a/configure.ac b/configure.ac index 538aa38a5..446fd9a98 100644 --- a/configure.ac +++ b/configure.ac @@ -143,6 +143,7 @@ AS_IF([test "x$ac_cv_gnu_plus_plus_11" = xyes], ]) AS_IF([test "x$require_gnu_plus_plus_11" = xyes], [CXXFLAGS="$CXXFLAGS -std=gnu++11"]) +AM_CONDITIONAL([GNU_PLUS_PLUS_11_DEPRECATIONS], [test "x$require_gnu_plus_plus_11" = xyes]) # Checks for header files. AC_HEADER_DIRENT diff --git a/debian/rules b/debian/rules index 59730a1f4..b4de45045 100755 --- a/debian/rules +++ b/debian/rules @@ -14,7 +14,7 @@ export VERBOSE=1 dh $@ --parallel --with bash_completion,python3 override_dh_auto_configure: - dh_auto_configure -- --enable-python-libs --enable-rdm-tests CXXFLAGS='-Wno-error=unused-parameter' pythondir='/usr/lib/python3/dist-packages' + dh_auto_configure -- --enable-python-libs --enable-rdm-tests CXXFLAGS='-Wno-error=deprecated-declarations -Wno-error=unused-parameter' pythondir='/usr/lib/python3/dist-packages' override_dh_installinit: dh_installinit -p ola --name=olad