vcpkg/ports/flatbuffers/no-werror.patch

24 lines
954 B
Diff
Raw Normal View History

2018-11-29 15:09:08 +08:00
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 119855a..6269362 100644
2018-11-29 15:09:08 +08:00
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -172,13 +172,17 @@ elseif(CMAKE_COMPILER_IS_GNUCXX)
2018-11-29 15:09:08 +08:00
"${CMAKE_CXX_FLAGS} -std=c++0x")
endif(CYGWIN)
set(CMAKE_CXX_FLAGS
- "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra -Werror=shadow")
+ "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Werror=shadow")
set(FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wold-style-cast")
2018-11-29 15:09:08 +08:00
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.4)
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -faligned-new -Werror=implicit-fallthrough=2")
2018-11-29 15:09:08 +08:00
endif()
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
+ set(CMAKE_CXX_FLAGS
+ "${CMAKE_CXX_FLAGS} -Wextra")
+ endif()
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wunused-result -Werror=unused-result -Wunused-parameter -Werror=unused-parameter")
endif()