You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

87 lines
3.4 KiB

Index: cmake/OpenCVCompilerOptions.cmake
--- cmake/OpenCVCompilerOptions.cmake.orig 2018-07-04 13:05:47.000000000 +0200
+++ cmake/OpenCVCompilerOptions.cmake 2018-07-04 20:56:03.526184000 +0200
@@ -85,24 +85,6 @@
if(CV_GCC OR CV_CLANG)
# High level of warnings.
- add_extra_compiler_option(-W)
- add_extra_compiler_option(-Wall)
- add_extra_compiler_option(-Werror=return-type)
- add_extra_compiler_option(-Werror=non-virtual-dtor)
- add_extra_compiler_option(-Werror=address)
- add_extra_compiler_option(-Werror=sequence-point)
- add_extra_compiler_option(-Wformat)
- add_extra_compiler_option(-Werror=format-security -Wformat)
- add_extra_compiler_option(-Wmissing-declarations)
- add_extra_compiler_option(-Wmissing-prototypes)
- add_extra_compiler_option(-Wstrict-prototypes)
- add_extra_compiler_option(-Wundef)
- add_extra_compiler_option(-Winit-self)
- add_extra_compiler_option(-Wpointer-arith)
- add_extra_compiler_option(-Wshadow)
- add_extra_compiler_option(-Wsign-promo)
- add_extra_compiler_option(-Wuninitialized)
- add_extra_compiler_option(-Winit-self)
if(HAVE_CXX11)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT ENABLE_PRECOMPILED_HEADERS)
add_extra_compiler_option(-Wsuggest-override)
@@ -117,7 +99,6 @@
else()
add_extra_compiler_option(-Wno-narrowing)
add_extra_compiler_option(-Wno-delete-non-virtual-dtor)
- add_extra_compiler_option(-Wno-unnamed-type-template-args)
add_extra_compiler_option(-Wno-comment)
if(NOT OPENCV_SKIP_IMPLICIT_FALLTHROUGH
AND NOT " ${CMAKE_CXX_FLAGS} ${OPENCV_EXTRA_FLAGS} ${OPENCV_EXTRA_CXX_FLAGS}" MATCHES "implicit-fallthrough"
Index: modules/core/src/utils/filesystem.cpp
--- modules/core/src/utils/filesystem.cpp.orig 2018-07-04 20:50:14.254953000 +0200
+++ modules/core/src/utils/filesystem.cpp 2018-07-04 20:57:15.022796000 +0200
@@ -34,7 +34,7 @@
#include <errno.h>
#include <io.h>
#include <stdio.h>
-#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__
+#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__ || defined __FreeBSD__
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -161,7 +161,7 @@
sz = GetCurrentDirectoryA((DWORD)buf.size(), (char*)buf);
return cv::String((char*)buf, (size_t)sz);
#endif
-#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__
+#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__ || defined __FreeBSD__
for(;;)
{
char* p = ::getcwd((char*)buf, buf.size());
@@ -195,7 +195,7 @@
#else
int result = _mkdir(path.c_str());
#endif
-#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__
+#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__ || defined __FreeBSD__
int result = mkdir(path.c_str(), 0777);
#else
int result = -1;
@@ -310,7 +310,7 @@
Impl& operator=(const Impl&); // disabled
};
-#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__
+#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__ || defined __FreeBSD__
struct FileLock::Impl
{
Index: modules/dnn/src/torch/THGeneral.cpp
--- modules/dnn/src/torch/THGeneral.cpp.orig 2018-07-04 13:05:47.000000000 +0200
+++ modules/dnn/src/torch/THGeneral.cpp 2018-07-04 20:50:14.255169000 +0200
@@ -2,7 +2,7 @@
#if defined(TH_DISABLE_HEAP_TRACKING)
#elif (defined(__unix) || defined(_WIN32))
-#include <malloc.h>
+#include <stdlib.h>
#elif defined(__APPLE__)
#include <malloc/malloc.h>
#endif