File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,6 +172,17 @@ endif()
172172protobuf_generate_cpp (GNS_COMMON_PROTO_SRCS GNS_COMMON_PROTO_HDRS ${GNS_COMMON_PROTOS} )
173173protobuf_generate_cpp (GNS_CLIENTLIB_PROTO_SRCS GNS_CLIENTLIB_PROTO_HDRS ${GNS_CLIENTLIB_PROTOS} )
174174
175+ # GCC 15 can emit -Wstringop-overflow on protobuf-generated struct copy patterns.
176+ # Keep -Werror for all hand-written code, but do not fail builds on this one
177+ # warning class in generated protobuf translation units.
178+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
179+ set_source_files_properties (
180+ ${GNS_COMMON_PROTO_SRCS}
181+ ${GNS_CLIENTLIB_PROTO_SRCS}
182+ PROPERTIES COMPILE_OPTIONS "-Wno-error=stringop-overflow"
183+ )
184+ endif ()
185+
175186function (gns_set_target_protobuf_properties TGT )
176187 target_link_libraries (${TGT} PUBLIC
177188 protobuf::libprotobuf
You can’t perform that action at this time.
0 commit comments