Drop -Wtype-limits, breaks build on gcc archs

ok ajacoutot@ (maintainer)
This commit is contained in:
jca 2017-12-01 15:47:11 +00:00
parent bf48089c91
commit 0e05fbb02b

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-CMakeLists_txt,v 1.1 2017/12/01 15:47:11 jca Exp $
base gcc does not understand -Wtype-limits and errors out.
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -402,7 +402,7 @@ if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}"
check_c_compiler_flag(-Wsizeof-pointer-memaccess HAVE_GCC_POINTER_MEMACCESS)
check_c_compiler_flag(-Wformat-security HAVE_GCC_FORMAT_SECURITY)
check_c_compiler_flag(-Wredundant-decls HAVE_GCC_REDUNDANT_DECLS)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -Wno-deprecated -Wall -Wno-unknown-pragmas -Wextra -Winit-self -Wmissing-include-dirs -Wunused -Wno-div-by-zero -Wundef -Wpointer-arith -Wtype-limits -Wwrite-strings -Werror=return-type")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -Wno-deprecated -Wall -Wno-unknown-pragmas -Wextra -Winit-self -Wmissing-include-dirs -Wunused -Wno-div-by-zero -Wundef -Wpointer-arith -Wwrite-strings -Werror=return-type")
if(HAVE_GCC_UNUSED_BUT_SET)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-but-set-variable")
endif()
@@ -434,7 +434,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_I
check_cxx_compiler_flag(-Wreorder HAVE_GXX_REORDER)
check_cxx_compiler_flag(-Wformat-security HAVE_GXX_FORMAT_SECURITY)
check_cxx_compiler_flag(-Wredundant-decls HAVE_GXX_REDUNDANT_DECLS)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Weffc++ -Wno-deprecated -Wall -Wextra -Woverloaded-virtual -Winit-self -Wmissing-include-dirs -Wunused -Wno-div-by-zero -Wundef -Wpointer-arith -Wtype-limits -Wwrite-strings -Werror=return-type")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Weffc++ -Wno-deprecated -Wall -Wextra -Woverloaded-virtual -Winit-self -Wmissing-include-dirs -Wunused -Wno-div-by-zero -Wundef -Wpointer-arith -Wwrite-strings -Werror=return-type")
if(HAVE_GXX_UNUSED_BUT_SET)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-but-set-variable")
endif()