Skip to content

Commit 12018b0

Browse files
committed
CMake/Github action: Modernize
1 parent 7463401 commit 12018b0

2 files changed

Lines changed: 7 additions & 22 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,49 +23,28 @@ jobs:
2323
build_type: [Dev]
2424
cpp_compiler: [g++]
2525
include:
26-
- image: "ubuntu:22.04"
27-
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds
28-
- image: "ubuntu:24.04"
29-
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds
3026
- image: "debian:bookworm"
3127
c_compiler: clang
3228
cpp_compiler: clang++
33-
- image: "debian:bookworm"
34-
build_type: RelWithDebInfo
35-
- image: "debian:trixie"
36-
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds
3729
- image: "debian:trixie"
3830
c_compiler: clang
3931
cpp_compiler: clang++
4032
- image: "debian:trixie"
4133
build_type: RelWithDebInfo
42-
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds
43-
- image: "debian:testing"
44-
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds -Wno-maybe-uninitialized
4534
- image: "debian:testing"
4635
c_compiler: clang
4736
cpp_compiler: clang++
48-
- image: "debian:experimental"
49-
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds -Wno-maybe-uninitialized
5037
- image: "debian:experimental"
5138
c_compiler: clang
5239
cpp_compiler: clang++
53-
- image: "fedora:40"
54-
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds
55-
- image: "fedora:41"
56-
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds
57-
- image: "fedora:42"
58-
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds -Wno-maybe-uninitialized
59-
- image: "fedora:43"
60-
CXXFLAGS: -Wno-stringop-overread -Wno-array-bounds -Wno-maybe-uninitialized
6140
container:
6241
image: ${{ matrix.image }}
6342
env:
6443
LANG: en_US.UTF-8
6544
BUILD_TYPE: ${{ matrix.build_type }}
6645
CC: ${{ matrix.c_compiler }}
6746
CXX: ${{ matrix.cpp_compiler }}
68-
CXXFLAGS: ${{ matrix.CXXFLAGS }}
47+
CXXFLAGS: -Werror ${{ matrix.CXXFLAGS }}
6948
LDFLAGS: ${{ matrix.LDFLAGS }}
7049
APT_LISTCHANGES_FRONTEND: none
7150
DEBIAN_FRONTEND: noninteractive
@@ -111,6 +90,7 @@ jobs:
11190
env:
11291
CC: clang-18
11392
CXX: clang++-18
93+
CXXFLAGS: -Werror
11494
BUILD_TYPE: Dev
11595
steps:
11696
- uses: actions/checkout@v4
@@ -135,6 +115,7 @@ jobs:
135115
env:
136116
CC: clang
137117
CXX: clang++
118+
CXXFLAGS: -Werror
138119
BUILD_TYPE: ${{ matrix.build_type }}
139120
steps:
140121
- uses: actions/checkout@v4

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ if(CMAKE_BUILD_TYPE STREQUAL "Dev")
168168
add_definitions(${OSMIUM_WARNING_OPTIONS})
169169
endif()
170170

171+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
172+
add_definitions(-Wno-stringop-overread)
173+
endif()
174+
171175
# Force RelWithDebInfo build type if none was given
172176
if(CMAKE_BUILD_TYPE)
173177
set(build_type ${CMAKE_BUILD_TYPE})

0 commit comments

Comments
 (0)