Skip to content

Commit e859679

Browse files
committed
CMake config: Disable warnings triggered by Osmium behaviour in GCC
Nothing we can do about these false-positives.
1 parent dcd5d7e commit e859679

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ jobs:
165165
env:
166166
CC: gcc-12
167167
CXX: g++-12
168-
EXTRA_FLAGS: -Wno-stringop-overread
169168
LUA_VERSION: 5.3
170169
LUAJIT_OPTION: ON
171170
POSTGRESQL_VERSION: 13
@@ -262,7 +261,6 @@ jobs:
262261
env:
263262
CC: gcc-12
264263
CXX: g++-12
265-
EXTRA_FLAGS: -Wno-stringop-overread
266264
LUA_VERSION: 5.4
267265
LUAJIT_OPTION: ON
268266
POSTGRESQL_VERSION: 16

.github/workflows/test-install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
POSTGRESQL_VERSION: 16
2323
POSTGIS_VERSION: 3
2424
BUILD_TYPE: Release
25-
CXXFLAGS: -pedantic -Wextra -Wno-stringop-overread -Werror
25+
CXXFLAGS: -pedantic -Wextra -Werror
2626
PREFIX: /usr/local
2727
OSMURL: https://download.geofabrik.de/europe/monaco-latest.osm.pbf
2828
OSMFILE: monaco-latest.osm.pbf

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ else()
5252
add_compile_options(-Wall)
5353
endif()
5454

55+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
56+
add_definitions(-Wno-stringop-overread -Wno-maybe-uninitialized)
57+
endif()
58+
5559
option(EXTERNAL_LIBOSMIUM "Do not use the bundled libosmium" OFF)
5660
option(EXTERNAL_PROTOZERO "Do not use the bundled protozero" OFF)
5761
option(EXTERNAL_FMT "Do not use the bundled fmt" OFF)

0 commit comments

Comments
 (0)