Don't match -Wnon-virtual-dtor in the "flags are needed to suppress

warnings in headers". It should fall through to the "don't impose our
warnings on others" case. Do this by matching on "-Wno-*" instead of
"-Wno*".

Fixes #1737

PiperOrigin-RevId: 659548798
Change-Id: I49d7ba7ddcd7be30f946fca90ba9be467181e854
This commit is contained in:
Derek Mauro
2024-08-05 07:35:05 -07:00
committed by Copybara-Service
parent 372124e6af
commit 9cb5e5d15c

View File

@@ -195,7 +195,7 @@ function(absl_cc_library)
# specified platform. Filter both of them out before the successor
# reaches the "^-m" filter.
set(skip_next_cflag ON)
elseif(${cflag} MATCHES "^(-Wno|/wd)")
elseif(${cflag} MATCHES "^(-Wno-|/wd)")
# These flags are needed to suppress warnings that might fire in our headers.
set(PC_CFLAGS "${PC_CFLAGS} ${cflag}")
elseif(${cflag} MATCHES "^(-W|/w[1234eo])")