Skip to content

Commit 45a5244

Browse files
author
Bogdan Degtyariov
committed
Fix warnings with -Wno-stringop-overflow globally
Change-Id: Ie857eb0c4590182fd0ccf77eb925871daf70306a
1 parent 2a12c43 commit 45a5244

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,12 @@ if(SUNPRO)
295295

296296
endif()
297297

298+
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12.0)
299+
# Silence a warning produced by a regression in GCC 12.0 and newer
300+
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106199
301+
add_compile_options(-Wno-stringop-overflow)
302+
endif()
303+
298304

299305
#
300306
# Testing framework

cdk/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,6 @@ ELSE()
214214
add_flags(CXX -Wall)
215215
endif()
216216

217-
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12.0)
218-
# Silence a warning produced by a regression in GCC 12.0 and newer
219-
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106199
220-
add_compile_options(-Wno-stringop-overflow)
221-
endif()
222-
223217
ENDIF()
224218

225219

0 commit comments

Comments
 (0)