diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index 4d6fb6cb9..113fb23a2 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -11,6 +11,9 @@ jobs: runs-on: ubuntu-latest name: Ubuntu + env: + CFLAGS: "-Werror" + CXXFLAGS: "-Werror" steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 0a8e9f164..5caf26dcf 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -16,6 +16,7 @@ jobs: cmake_options: -DPA_USE_OSS=ON -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake + werror_flags: "-Werror" - name: Ubuntu MinGW os: ubuntu-latest install_dir: ~/portaudio @@ -29,6 +30,7 @@ jobs: -DPA_USE_ASIO=ON -DASIO_SDK_ZIP_PATH=asiosdk.zip -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/i686-w64-mingw32.cmake + werror_flags: "-Werror" - name: Windows MSVC os: windows-latest install_dir: C:\portaudio @@ -42,6 +44,7 @@ jobs: -DPA_USE_ASIO=ON -DASIO_SDK_ZIP_PATH="asiosdk.zip" -DCMAKE_TOOLCHAIN_FILE=D:\a\portaudio\portaudio\vcpkg\scripts\buildsystems\vcpkg.cmake + werror_flags: "" # TODO: use "/WX" - name: Windows MinGW os: windows-latest install_dir: C:\portaudio @@ -55,6 +58,7 @@ jobs: -DPA_USE_ASIO=ON -DASIO_SDK_ZIP_PATH="asiosdk.zip" -DCMAKE_TOOLCHAIN_FILE=D:\a\portaudio\portaudio\vcpkg\scripts\buildsystems\vcpkg.cmake + werror_flags: "-Werror" - name: macOS Clang os: macOS-latest install_dir: ~/portaudio @@ -63,6 +67,7 @@ jobs: cmake_options: -DCMAKE_FRAMEWORK=OFF -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake + werror_flags: "-Werror" - name: macOS Clang framework os: macOS-latest install_dir: ~/portaudio @@ -71,11 +76,14 @@ jobs: cmake_options: -DCMAKE_FRAMEWORK=ON -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake + werror_flags: "-Werror" runs-on: ${{ matrix.os }} name: ${{ matrix.name }} env: cmake_build_type: RelWithDebInfo + CFLAGS: ${{ matrix.werror_flags }} + CXXFLAGS: ${{ matrix.werror_flags }} steps: - name: checkout Git repository uses: actions/checkout@v2 diff --git a/configure b/configure index c13a09d3c..899097fb0 100755 --- a/configure +++ b/configure @@ -15866,7 +15866,7 @@ case "${host_os}" in $as_echo "#define PA_USE_COREAUDIO 1" >>confdefs.h - CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Wno-deprecated -Werror" + CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Wno-deprecated" LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework CoreFoundation -framework CoreServices" if test "x$enable_mac_universal" = "xyes" ; then diff --git a/configure.in b/configure.in index c1dad1a05..d72caa56d 100644 --- a/configure.in +++ b/configure.in @@ -221,7 +221,7 @@ case "${host_os}" in AC_DEFINE(PA_USE_COREAUDIO,1) - CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Wno-deprecated -Werror" + CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Wno-deprecated" LIBS="-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework CoreFoundation -framework CoreServices" if test "x$enable_mac_universal" = "xyes" ; then