build: enable gcc-12/13+, clang-10+ picky warnings

Cherry-picked from #17190
Closes #17196
This commit is contained in:
Viktor Szakats 2025-04-26 09:28:28 +02:00
parent f9eb9e5e23
commit 4b7accda5a
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
2 changed files with 20 additions and 0 deletions

View file

@ -179,6 +179,7 @@ if(PICKY_COMPILER)
(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.4))
list(APPEND _picky_enable
-Wimplicit-fallthrough # clang 4.0 gcc 7.0 appleclang 12.4 # We do silencing for clang 10.0 and above only
-Wxor-used-as-pow # clang 10.0 gcc 13.0
)
endif()
else() # gcc
@ -242,6 +243,13 @@ if(PICKY_COMPILER)
-Wenum-conversion # clang 3.2 gcc 10.0 appleclang 4.6 g++ 11.0
)
endif()
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)
list(APPEND _picky_enable
-Warray-compare # clang 20.0 gcc 12.0
-Wenum-int-mismatch # gcc 13.0
-Wxor-used-as-pow # clang 10.0 gcc 13.0
)
endif()
endif()
#