-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Enhancement] patching flatbuffers CMakeLists.txt (#54579)
Signed-off-by: Kevin Xiaohua Cai <[email protected]>
- Loading branch information
Showing
3 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
thirdparty/patches/flat-buffers-1.10.0-no-stringop-overread.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 76619dc..7603a72 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -139,6 +139,10 @@ elseif(CMAKE_COMPILER_IS_GNUCXX) | ||
set(CMAKE_CXX_FLAGS | ||
"${CMAKE_CXX_FLAGS} -faligned-new") | ||
endif() | ||
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11.0) | ||
+ # disable stringop-overread for gcc >= 11.0 | ||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-stringop-overread") | ||
+ endif() | ||
set(CMAKE_CXX_FLAGS | ||
"${CMAKE_CXX_FLAGS} -Wunused-result -Werror=unused-result -Wunused-parameter -Werror=unused-parameter") | ||
endif() |