Moved GCC 15 fix to flags.cmake

This commit is contained in:
SChernykh
2025-05-07 17:29:59 +02:00
parent 2a30901ba5
commit 9abe993bb0
2 changed files with 10 additions and 2 deletions

View File

@@ -337,8 +337,8 @@ jobs:
strategy:
matrix:
config:
- {c: "gcc", cxx: "g++", flags: "-ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes -Wno-error=cpp"}
- {c: "clang", cxx: "clang++", flags: "-fuse-ld=lld -Wno-unused-command-line-argument -Wno-nan-infinity-disabled -Wno-error=cpp"}
- {c: "gcc", cxx: "g++", flags: "-ffunction-sections -Wno-error=maybe-uninitialized -Wno-error=attributes"}
- {c: "clang", cxx: "clang++", flags: "-fuse-ld=lld -Wno-unused-command-line-argument -Wno-nan-infinity-disabled"}
defaults:
run:

View File

@@ -23,6 +23,10 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
set(WARNING_FLAGS "${WARNING_FLAGS} -Wstrict-overflow=2")
endif()
if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15))
set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-error=cpp")
endif()
if (DISABLE_WARNINGS)
set(WARNING_FLAGS "-w")
endif()
@@ -111,6 +115,10 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
set(WARNING_FLAGS "-Wall -Wextra -Wno-unused-function -Wno-undefined-internal -Wunreachable-code-aggressive -Wmissing-prototypes -Wmissing-variable-declarations -Werror")
if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20))
set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-error=cpp")
endif()
if (DISABLE_WARNINGS)
set(WARNING_FLAGS "-w")
endif()