Skip to content

Commit

Permalink
cmake: disable maximum object size warning reported by gcc 13.2
Browse files Browse the repository at this point in the history
warning: ‘void* __builtin_memset(void*, int, long unsigned int)’ specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
  • Loading branch information
alexey-lysiuk committed Oct 2, 2024
1 parent 67514aa commit 6b35c52
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,12 @@ else()
set_source_files_properties(${IMGUI_COLOR_TEXT_EDIT_DIR}/TextEditor.cpp
PROPERTIES COMPILE_FLAGS "-Wno-unused-variable -Wno-sign-compare")

# Disable G++ format string truncation warning
# warning: ‘%s’ directive output may be truncated writing up to 31 bytes into a region of size 28
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# Disable warning: '%s' directive output may be truncated writing up to 31 bytes into a region of size 28
set_source_files_properties(${IMGUI_DIR}/imgui_demo.cpp PROPERTIES COMPILE_FLAGS "-Wno-format-truncation")

# Disable warning: specified size between ??? and ??? exceeds maximum object size ???
set_source_files_properties(${IMGUI_DIR}/imgui_draw.cpp PROPERTIES COMPILE_FLAGS "-Wno-stringop-overflow")
endif()

# Disable C++ exceptions and RTTI
Expand Down

0 comments on commit 6b35c52

Please sign in to comment.