File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -40,17 +40,24 @@ jobs:
4040 matrix :
4141 os : [ ubuntu-latest, macOS-latest ]
4242 cxx : [ g++, clang++ ]
43+ cxxflags : [ '-Werror' ]
44+ # msvc's `-Werror` is `/WX`
4345 include :
4446 - os : windows-2022
4547 target : x86_64-pc-windows-msvc
48+ cxxflags : ' /WX'
4649 - os : windows-2022
4750 target : x86_64-pc-windows-msvc
4851 cxx : clang++
52+ cxxflags : ' -Werror'
4953 - os : windows-2022
5054 target : x86_64-pc-windows-gnu
55+ cxxflags : ' /WX'
5156 runs-on : ${{ matrix.os }}
5257 env :
5358 CXX : ${{ matrix.cxx }}
59+ # error on compiler warnings in CI
60+ CXXFLAGS : ${{ matrix.cxxflags }}
5461 steps :
5562 - uses : actions/checkout@v4
5663 with :
Original file line number Diff line number Diff line change @@ -126,7 +126,6 @@ fn main() {
126126 . flag ( "-Wno-missing-field-initializers" )
127127 . flag ( "-Wno-stringop-overflow" )
128128 . flag ( "-Wno-array-bounds" )
129- . flag ( "-Werror" )
130129 . flag ( "-std=c++17" )
131130 . flag ( "-fno-exceptions" )
132131 . flag ( "-fno-rtti" )
@@ -144,7 +143,6 @@ fn main() {
144143 . flag ( "-Wnon-virtual-dtor" )
145144 . flag ( "-Wno-missing-field-initializers" )
146145 . flag ( "-Wno-self-assign" )
147- . flag ( "-Werror" )
148146 . flag ( "-std=c++17" )
149147 . flag ( "-fno-exceptions" )
150148 . flag ( "-fno-rtti" )
You can’t perform that action at this time.
0 commit comments