Skip to content

Commit

Permalink
Help future-proof GCC/Clang unified build options
Browse files Browse the repository at this point in the history
The YAML uses a single `CXXFLAGS` for GCC and Clang flags, which is mostly okay because they tend to support the same flags... but sometimes GCC and Clang differ

So added `-Wno-unknown-warning -Wno-unknown-warning-option`... the first is GCC's spelling and seems to ignore only `-Wno-xxx` negative flags, the second is Clang's spelling and seems to also ignore `-Wxxx` flags, and using them both seems to work to make GCC and Clang ignore also each other's no-warning options (which is either meta or a sweet irony)

HT: @DyXel thanks for hsutter#916 (comment)
  • Loading branch information
hsutter committed Jan 5, 2024
1 parent fc5a354 commit 5a032d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-cppfront.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
runs-on: ${{ matrix.runs-on }}
env:
CXX: ${{ matrix.compiler }}
CXXFLAGS: -std=${{ matrix.cxx-std }} -Wall -Wextra -Wold-style-cast -Wunused-parameter -Wpedantic -Werror -pthread
CXXFLAGS: -std=${{ matrix.cxx-std }} -Wall -Wextra -Wold-style-cast -Wunused-parameter -Wpedantic -Werror -pthread -Wno-unknown-warning -Wno-unknown-warning-option
steps:
- uses: actions/checkout@v3
- name: Install compiler
Expand Down

0 comments on commit 5a032d7

Please sign in to comment.