Commit 2f409055 authored by Andrey Kamaev's avatar Andrey Kamaev

Fixed Android build

parent ec0ec693
...@@ -25,6 +25,8 @@ if(CMAKE_COMPILER_IS_GNUCXX) ...@@ -25,6 +25,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set_source_files_properties(jcdctmgr.c PROPERTIES COMPILE_FLAGS "-O1") set_source_files_properties(jcdctmgr.c PROPERTIES COMPILE_FLAGS "-O1")
endif() endif()
ocv_warnings_disable(CMAKE_C_FLAGS -Wcast-align)
set_target_properties(${JPEG_LIBRARY} set_target_properties(${JPEG_LIBRARY}
PROPERTIES OUTPUT_NAME ${JPEG_LIBRARY} PROPERTIES OUTPUT_NAME ${JPEG_LIBRARY}
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
......
...@@ -21,6 +21,8 @@ if(UNIX) ...@@ -21,6 +21,8 @@ if(UNIX)
endif() endif()
endif() endif()
ocv_warnings_disable(CMAKE_C_FLAGS -Wcast-align)
set_target_properties(${PNG_LIBRARY} set_target_properties(${PNG_LIBRARY}
PROPERTIES OUTPUT_NAME ${PNG_LIBRARY} PROPERTIES OUTPUT_NAME ${PNG_LIBRARY}
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
......
...@@ -90,7 +90,7 @@ if(WIN32) ...@@ -90,7 +90,7 @@ if(WIN32)
list(APPEND lib_srcs tif_win32.c) list(APPEND lib_srcs tif_win32.c)
endif(WIN32) endif(WIN32)
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef) ocv_warnings_disable(CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef -Wcast-align)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations) ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations)
if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)) if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC))
......
...@@ -21,76 +21,102 @@ if(MSVC) ...@@ -21,76 +21,102 @@ if(MSVC)
endif() endif()
endif() endif()
set(OPENCV_EXTRA_FLAGS "")
set(OPENCV_EXTRA_C_FLAGS "") set(OPENCV_EXTRA_C_FLAGS "")
set(OPENCV_EXTRA_C_FLAGS_RELEASE "") set(OPENCV_EXTRA_CXX_FLAGS "")
set(OPENCV_EXTRA_C_FLAGS_DEBUG "") set(OPENCV_EXTRA_FLAGS_RELEASE "")
set(OPENCV_EXTRA_FLAGS_DEBUG "")
set(OPENCV_EXTRA_EXE_LINKER_FLAGS "") set(OPENCV_EXTRA_EXE_LINKER_FLAGS "")
set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "") set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "")
set(OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG "") set(OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG "")
macro(add_extra_compiler_option option)
ocv_check_flag_support(CXX "${option}" _varname ${ARGN})
if(${_varname})
set(OPENCV_EXTRA_CXX_FLAGS "${OPENCV_EXTRA_CXX_FLAGS} ${option}")
endif()
ocv_check_flag_support(C "${option}" _varname ${ARGN})
if(${_varname})
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} ${option}")
endif()
endmacro()
if(MINGW) if(MINGW)
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838
# here we are trying to workaround the problem # here we are trying to workaround the problem
include(CheckCXXCompilerFlag) include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG(-mstackrealign HAVE_STACKREALIGN_FLAG) CHECK_CXX_COMPILER_FLAG(-mstackrealign HAVE_STACKREALIGN_FLAG)
if(HAVE_STACKREALIGN_FLAG) if(HAVE_STACKREALIGN_FLAG)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -mstackrealign") set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} -mstackrealign")
else() else()
CHECK_CXX_COMPILER_FLAG(-mpreferred-stack-boundary=2 HAVE_PREFERRED_STACKBOUNDARY_FLAG) CHECK_CXX_COMPILER_FLAG(-mpreferred-stack-boundary=2 HAVE_PREFERRED_STACKBOUNDARY_FLAG)
if(HAVE_PREFERRED_STACKBOUNDARY_FLAG) if(HAVE_PREFERRED_STACKBOUNDARY_FLAG)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -mstackrealign") set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} -mstackrealign")
endif() endif()
endif() endif()
endif() endif()
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
# High level of warnings. # High level of warnings.
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -Wall") add_extra_compiler_option(-Wall)
add_extra_compiler_option(-Werror=return-type)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=format-security") add_extra_compiler_option(-Werror=non-virtual-dtor)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -Wmissing-declarations -Wcast-align -Wundef -Winit-self -Wpointer-arith") #-Wstrict-aliasing=2 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(-Wcast-align)
#add_extra_compiler_option(-Wstrict-aliasing=2)
#add_extra_compiler_option(-Wshadow)
# The -Wno-long-long is required in 64bit systems when including sytem headers. # The -Wno-long-long is required in 64bit systems when including sytem headers.
if(X86_64) if(X86_64)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -Wno-long-long") add_extra_compiler_option(-Wno-long-long)
endif() endif()
# We need pthread's # We need pthread's
if(UNIX AND NOT ANDROID) if(UNIX AND NOT ANDROID)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -pthread") add_extra_compiler_option(-pthread)
endif() endif()
if(OPENCV_WARNINGS_ARE_ERRORS) if(OPENCV_WARNINGS_ARE_ERRORS)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -Werror") add_extra_compiler_option(-Werror)
endif() endif()
if(X86 AND NOT MINGW64 AND NOT X86_64 AND NOT APPLE) if(X86 AND NOT MINGW64 AND NOT X86_64 AND NOT APPLE)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -march=i686") add_extra_compiler_option(-march=i686)
endif() endif()
# Other optimizations # Other optimizations
if(ENABLE_OMIT_FRAME_POINTER) if(ENABLE_OMIT_FRAME_POINTER)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -fomit-frame-pointer") add_extra_compiler_option(-fomit-frame-pointer)
else() else()
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -fno-omit-frame-pointer") add_extra_compiler_option(-fno-omit-frame-pointer)
endif() endif()
if(ENABLE_FAST_MATH) if(ENABLE_FAST_MATH)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -ffast-math") add_extra_compiler_option(-ffast-math)
endif() endif()
if(ENABLE_POWERPC) if(ENABLE_POWERPC)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -mcpu=G3 -mtune=G5") add_extra_compiler_option("-mcpu=G3 -mtune=G5")
endif() endif()
if(ENABLE_SSE) if(ENABLE_SSE)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -msse") add_extra_compiler_option(-msse)
endif() endif()
if(ENABLE_SSE2) if(ENABLE_SSE2)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -msse2") add_extra_compiler_option(-msse2)
endif() endif()
# SSE3 and further should be disabled under MingW because it generates compiler errors # SSE3 and further should be disabled under MingW because it generates compiler errors
if(NOT MINGW) if(NOT MINGW)
if(ENABLE_SSE3) if(ENABLE_SSE3)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -msse3") add_extra_compiler_option(-msse3)
endif() endif()
if(${CMAKE_OPENCV_GCC_VERSION_NUM} GREATER 402) if(${CMAKE_OPENCV_GCC_VERSION_NUM} GREATER 402)
...@@ -102,14 +128,14 @@ if(CMAKE_COMPILER_IS_GNUCXX) ...@@ -102,14 +128,14 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(HAVE_GCC42_OR_NEWER OR APPLE) if(HAVE_GCC42_OR_NEWER OR APPLE)
if(ENABLE_SSSE3) if(ENABLE_SSSE3)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -mssse3") add_extra_compiler_option(-mssse3)
endif() endif()
if(HAVE_GCC43_OR_NEWER) if(HAVE_GCC43_OR_NEWER)
if(ENABLE_SSE41) if(ENABLE_SSE41)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -msse4.1") add_extra_compiler_option(-msse4.1)
endif() endif()
if(ENABLE_SSE42) if(ENABLE_SSE42)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -msse4.2") add_extra_compiler_option(-msse4.2)
endif() endif()
endif() endif()
endif() endif()
...@@ -118,38 +144,39 @@ if(CMAKE_COMPILER_IS_GNUCXX) ...@@ -118,38 +144,39 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(X86 OR X86_64) if(X86 OR X86_64)
if(NOT APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 4) if(NOT APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 4)
if(ENABLE_SSE2) if(ENABLE_SSE2)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -mfpmath=sse")# !! important - be on the same wave with x64 compilers add_extra_compiler_option(-mfpmath=sse)# !! important - be on the same wave with x64 compilers
else() else()
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -mfpmath=387") add_extra_compiler_option(-mfpmath=387)
endif() endif()
endif() endif()
endif() endif()
# Profiling? # Profiling?
if(ENABLE_PROFILING) if(ENABLE_PROFILING)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -pg -g") add_extra_compiler_option("-pg -g")
# turn off incompatible options # turn off incompatible options
foreach(flags CMAKE_CXX_FLAGS CMAKE_C_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG OPENCV_EXTRA_C_FLAGS_RELEASE) foreach(flags CMAKE_CXX_FLAGS CMAKE_C_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG
OPENCV_EXTRA_FLAGS_RELEASE OPENCV_EXTRA_FLAGS_DEBUG OPENCV_EXTRA_C_FLAGS OPENCV_EXTRA_CXX_FLAGS)
string(REPLACE "-fomit-frame-pointer" "" ${flags} "${${flags}}") string(REPLACE "-fomit-frame-pointer" "" ${flags} "${${flags}}")
string(REPLACE "-ffunction-sections" "" ${flags} "${${flags}}") string(REPLACE "-ffunction-sections" "" ${flags} "${${flags}}")
endforeach() endforeach()
elseif(NOT APPLE AND NOT ANDROID) elseif(NOT APPLE AND NOT ANDROID)
# Remove unreferenced functions: function level linking # Remove unreferenced functions: function level linking
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} -ffunction-sections") add_extra_compiler_option(-ffunction-sections)
endif() endif()
set(OPENCV_EXTRA_C_FLAGS_RELEASE "${OPENCV_EXTRA_C_FLAGS_RELEASE} -DNDEBUG") set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} -DNDEBUG")
set(OPENCV_EXTRA_C_FLAGS_DEBUG "${OPENCV_EXTRA_C_FLAGS_DEBUG} -O0 -DDEBUG -D_DEBUG") set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -O0 -DDEBUG -D_DEBUG")
if(BUILD_WITH_DEBUG_INFO) if(BUILD_WITH_DEBUG_INFO)
set(OPENCV_EXTRA_C_FLAGS_DEBUG "${OPENCV_EXTRA_C_FLAGS_DEBUG} -ggdb3") set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -ggdb3")
endif() endif()
endif() endif()
if(MSVC) if(MSVC)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS") set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS")
# 64-bit portability warnings, in MSVC80 # 64-bit portability warnings, in MSVC80
if(MSVC80) if(MSVC80)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /Wp64") set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /Wp64")
endif() endif()
if(BUILD_WITH_DEBUG_INFO) if(BUILD_WITH_DEBUG_INFO)
...@@ -157,38 +184,38 @@ if(MSVC) ...@@ -157,38 +184,38 @@ if(MSVC)
endif() endif()
# Remove unreferenced functions: function level linking # Remove unreferenced functions: function level linking
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /Gy") set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /Gy")
if(NOT MSVC_VERSION LESS 1400) if(NOT MSVC_VERSION LESS 1400)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /bigobj") set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /bigobj")
endif() endif()
if(BUILD_WITH_DEBUG_INFO) if(BUILD_WITH_DEBUG_INFO)
set(OPENCV_EXTRA_C_FLAGS_RELEASE "${OPENCV_EXTRA_C_FLAGS_RELEASE} /Zi") set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} /Zi")
endif() endif()
if(NOT MSVC64) if(NOT MSVC64)
# 64-bit MSVC compiler uses SSE/SSE2 by default # 64-bit MSVC compiler uses SSE/SSE2 by default
if(ENABLE_SSE) if(ENABLE_SSE)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /arch:SSE") set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /arch:SSE")
endif() endif()
if(ENABLE_SSE2) if(ENABLE_SSE2)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /arch:SSE2") set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /arch:SSE2")
endif() endif()
endif() endif()
if(ENABLE_SSE3) if(ENABLE_SSE3)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /arch:SSE3") set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /arch:SSE3")
endif() endif()
if(ENABLE_SSE4_1) if(ENABLE_SSE4_1)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /arch:SSE4.1") set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /arch:SSE4.1")
endif() endif()
if(ENABLE_SSE OR ENABLE_SSE2 OR ENABLE_SSE3 OR ENABLE_SSE4_1) if(ENABLE_SSE OR ENABLE_SSE2 OR ENABLE_SSE3 OR ENABLE_SSE4_1)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /Oi") set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /Oi")
endif() endif()
if(X86 OR X86_64) if(X86 OR X86_64)
if(CMAKE_SIZEOF_VOID_P EQUAL 4 AND ENABLE_SSE2) if(CMAKE_SIZEOF_VOID_P EQUAL 4 AND ENABLE_SSE2)
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /fp:fast")# !! important - be on the same wave with x64 compilers set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /fp:fast")# !! important - be on the same wave with x64 compilers
endif() endif()
endif() endif()
endif() endif()
...@@ -197,33 +224,31 @@ endif() ...@@ -197,33 +224,31 @@ endif()
if(NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX AND NOT ANDROID) if(NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX AND NOT ANDROID)
# Android does not need these settings because they are already set by toolchain file # Android does not need these settings because they are already set by toolchain file
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} stdc++) set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} stdc++)
set(OPENCV_EXTRA_C_FLAGS "-fPIC ${OPENCV_EXTRA_C_FLAGS}") set(OPENCV_EXTRA_FLAGS "-fPIC ${OPENCV_EXTRA_FLAGS}")
endif() endif()
# Add user supplied extra options (optimization, etc...) # Add user supplied extra options (optimization, etc...)
# ========================================================== # ==========================================================
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS}" CACHE INTERNAL "Extra compiler options") set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS}" CACHE INTERNAL "Extra compiler options")
set(OPENCV_EXTRA_C_FLAGS_RELEASE "${OPENCV_EXTRA_C_FLAGS_RELEASE}" CACHE INTERNAL "Extra compiler options for Release build") set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS}" CACHE INTERNAL "Extra compiler options for C sources")
set(OPENCV_EXTRA_C_FLAGS_DEBUG "${OPENCV_EXTRA_C_FLAGS_DEBUG}" CACHE INTERNAL "Extra compiler options for Debug build") set(OPENCV_EXTRA_CXX_FLAGS "${OPENCV_EXTRA_CXX_FLAGS}" CACHE INTERNAL "Extra compiler options for C++ sources")
set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE}" CACHE INTERNAL "Extra compiler options for Release build")
set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG}" CACHE INTERNAL "Extra compiler options for Debug build")
set(OPENCV_EXTRA_EXE_LINKER_FLAGS "${OPENCV_EXTRA_EXE_LINKER_FLAGS}" CACHE INTERNAL "Extra linker flags") set(OPENCV_EXTRA_EXE_LINKER_FLAGS "${OPENCV_EXTRA_EXE_LINKER_FLAGS}" CACHE INTERNAL "Extra linker flags")
set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE}" CACHE INTERNAL "Extra linker flags for Release build") set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE}" CACHE INTERNAL "Extra linker flags for Release build")
set(OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG "${OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG}" CACHE INTERNAL "Extra linker flags for Debug build") set(OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG "${OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG}" CACHE INTERNAL "Extra linker flags for Debug build")
#combine all "extra" options #combine all "extra" options
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPENCV_EXTRA_C_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPENCV_EXTRA_FLAGS} ${OPENCV_EXTRA_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OPENCV_EXTRA_C_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OPENCV_EXTRA_FLAGS} ${OPENCV_EXTRA_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${OPENCV_EXTRA_C_FLAGS_RELEASE}") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${OPENCV_EXTRA_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${OPENCV_EXTRA_C_FLAGS_RELEASE}") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${OPENCV_EXTRA_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${OPENCV_EXTRA_C_FLAGS_DEBUG}") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${OPENCV_EXTRA_FLAGS_DEBUG}")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${OPENCV_EXTRA_C_FLAGS_DEBUG}") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${OPENCV_EXTRA_FLAGS_DEBUG}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OPENCV_EXTRA_EXE_LINKER_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OPENCV_EXTRA_EXE_LINKER_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE}") set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE}")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG}") set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG}")
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-prototypes -Wstrict-prototypes")
endif()
if(MSVC) if(MSVC)
# avoid warnings from MSVC about overriding the /W* option # avoid warnings from MSVC about overriding the /W* option
# we replace /W3 with /W4 only for C++ files, # we replace /W3 with /W4 only for C++ files,
......
...@@ -20,17 +20,17 @@ set(OPENCV_MOD_LIST ${OPENCV_MODULES_PUBLIC}) ...@@ -20,17 +20,17 @@ set(OPENCV_MOD_LIST ${OPENCV_MODULES_PUBLIC})
ocv_list_sort(OPENCV_MOD_LIST) ocv_list_sort(OPENCV_MOD_LIST)
foreach(m ${OPENCV_MOD_LIST}) foreach(m ${OPENCV_MOD_LIST})
string(TOUPPER "${m}" m) string(TOUPPER "${m}" m)
set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE}#define HAVE_${m} 1\n") set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE}#define HAVE_${m}\n")
endforeach() endforeach()
set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE}\n") set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE}\n")
set(OPENCV_MOD_LIST ${OPENCV_MODULES_DISABLED_USER} ${OPENCV_MODULES_DISABLED_AUTO}) #set(OPENCV_MOD_LIST ${OPENCV_MODULES_DISABLED_USER} ${OPENCV_MODULES_DISABLED_AUTO} ${OPENCV_MODULES_DISABLED_FORCE})
ocv_list_sort(OPENCV_MOD_LIST) #ocv_list_sort(OPENCV_MOD_LIST)
foreach(m ${OPENCV_MOD_LIST}) #foreach(m ${OPENCV_MOD_LIST})
string(TOUPPER "${m}" m) # string(TOUPPER "${m}" m)
set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE}#undef HAVE_${m}\n") # set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE}#undef HAVE_${m}\n")
endforeach() #endforeach()
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv_modules.hpp.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp") configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv_modules.hpp.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp")
install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_PREFIX}/opencv2 COMPONENT main) install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_PREFIX}/opencv2 COMPONENT main)
...@@ -47,12 +47,12 @@ macro(ocv_check_flag_support lang flag varname) ...@@ -47,12 +47,12 @@ macro(ocv_check_flag_support lang flag varname)
string(TOUPPER "${flag}" ${varname}) string(TOUPPER "${flag}" ${varname})
string(REGEX REPLACE "^(/|-)" "HAVE_${_lang}_" ${varname} "${${varname}}") string(REGEX REPLACE "^(/|-)" "HAVE_${_lang}_" ${varname} "${${varname}}")
string(REPLACE "-" "_" ${varname} "${${varname}}") string(REGEX REPLACE " -|-|=| |\\." "_" ${varname} "${${varname}}")
if(_lang STREQUAL "CXX") if(_lang STREQUAL "CXX")
CHECK_CXX_COMPILER_FLAG(${flag} ${${varname}}) CHECK_CXX_COMPILER_FLAG("${ARGN} ${flag}" ${${varname}})
elseif(_lang STREQUAL "C") elseif(_lang STREQUAL "C")
CHECK_C_COMPILER_FLAG("${flag}" ${${varname}}) CHECK_C_COMPILER_FLAG("${ARGN} ${flag}" ${${varname}})
else() else()
set(${varname} FALSE) set(${varname} FALSE)
endif() endif()
......
...@@ -724,10 +724,10 @@ CV_IMPL void cvSaveWindowParameters(const char* name) ...@@ -724,10 +724,10 @@ CV_IMPL void cvSaveWindowParameters(const char* name)
CV_NO_GUI_ERROR("cvSaveWindowParameters"); CV_NO_GUI_ERROR("cvSaveWindowParameters");
} }
CV_IMPL void cvLoadWindowParameterss(const char* name) // CV_IMPL void cvLoadWindowParameterss(const char* name)
{ // {
CV_NO_GUI_ERROR("cvLoadWindowParameters"); // CV_NO_GUI_ERROR("cvLoadWindowParameters");
} // }
CV_IMPL int cvCreateButton(const char*, void (*)(int, void*), void*, int, int) CV_IMPL int cvCreateButton(const char*, void (*)(int, void*), void*, int, int)
{ {
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include "test_precomp.hpp" #include "test_precomp.hpp"
#include "opencv2/highgui/highgui.hpp" #include "opencv2/highgui/highgui.hpp"
#if defined HAVE_GTK || defined HAVE_QT || defined WIN32 || defined _WIN32 || HAVE_CARBON || HAVE_COCOA #if defined HAVE_GTK || defined HAVE_QT || defined WIN32 || defined _WIN32 || defined HAVE_CARBON || defined HAVE_COCOA
using namespace cv; using namespace cv;
using namespace std; using namespace std;
......
...@@ -162,6 +162,8 @@ else() ...@@ -162,6 +162,8 @@ else()
endif() endif()
add_dependencies(${the_module} ${api_target}) add_dependencies(${the_module} ${api_target})
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations)
# Additional target properties # Additional target properties
set_target_properties(${the_module} PROPERTIES set_target_properties(${the_module} PROPERTIES
OUTPUT_NAME "${the_module}" OUTPUT_NAME "${the_module}"
......
#include <jni.h> #include <jni.h>
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_NONFREE
# include "opencv2/nonfree/nonfree.hpp"
#endif
#ifdef HAVE_OPENCV_FEATURES2D
# include "opencv2/features2d/features2d.hpp"
#endif
#ifdef HAVE_OPENCV_VIDEO
# include "opencv2/video/video.hpp"
#endif
#ifdef HAVE_OPENCV_ML
# include "opencv2/ml/ml.hpp"
#endif
extern "C" { extern "C" {
JNIEXPORT jint JNICALL JNIEXPORT jint JNICALL
...@@ -9,6 +27,23 @@ JNI_OnLoad(JavaVM* vm, void* reserved) ...@@ -9,6 +27,23 @@ JNI_OnLoad(JavaVM* vm, void* reserved)
if (vm->GetEnv((void**) &env, JNI_VERSION_1_6) != JNI_OK) if (vm->GetEnv((void**) &env, JNI_VERSION_1_6) != JNI_OK)
return -1; return -1;
bool init = true;
#ifdef HAVE_OPENCV_NONFREE
init &= cv::initModule_nonfree();
#endif
#ifdef HAVE_OPENCV_FEATURES2D
init &= cv::initModule_features2d();
#endif
#ifdef HAVE_OPENCV_VIDEO
init &= cv::initModule_video();
#endif
#ifdef HAVE_OPENCV_ML
init &= cv::initModule_ml();
#endif
if(!init)
return -1;
/* get class with (*env)->FindClass */ /* get class with (*env)->FindClass */
/* register methods with (*env)->RegisterNatives */ /* register methods with (*env)->RegisterNatives */
...@@ -22,15 +57,3 @@ JNI_OnUnload(JavaVM *vm, void *reserved) ...@@ -22,15 +57,3 @@ JNI_OnUnload(JavaVM *vm, void *reserved)
} }
} // extern "C" } // extern "C"
\ No newline at end of file
#include "opencv2/opencv_modules.hpp"
#if HAVE_OPENCV_MODULES_NONFREE
#include "opencv2/nonfree/nonfree.hpp"
static bool makeUseOfNonfree = initModule_nonfree();
#endif
#if HAVE_OPENCV_MODULES_FEATURES2D
#include "opencv2/features2d/features2d.hpp"
static bool makeUseOfNonfree = initModule_features2d();
#endif
\ No newline at end of file
...@@ -18,7 +18,7 @@ using std::tr1::get; ...@@ -18,7 +18,7 @@ using std::tr1::get;
typedef TestBaseWithParam<String> stitch; typedef TestBaseWithParam<String> stitch;
typedef TestBaseWithParam<String> match; typedef TestBaseWithParam<String> match;
#if HAVE_OPENCV_NONFREE #ifdef HAVE_OPENCV_NONFREE
#define TEST_DETECTORS testing::Values("surf", "orb") #define TEST_DETECTORS testing::Values("surf", "orb")
#else #else
#define TEST_DETECTORS testing::Values<String>("orb") #define TEST_DETECTORS testing::Values<String>("orb")
......
...@@ -61,7 +61,7 @@ Stitcher Stitcher::createDefault(bool try_use_gpu) ...@@ -61,7 +61,7 @@ Stitcher Stitcher::createDefault(bool try_use_gpu)
#ifdef HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
if (try_use_gpu && gpu::getCudaEnabledDeviceCount() > 0) if (try_use_gpu && gpu::getCudaEnabledDeviceCount() > 0)
{ {
#if HAVE_OPENCV_NONFREE #ifdef HAVE_OPENCV_NONFREE
stitcher.setFeaturesFinder(new detail::SurfFeaturesFinderGpu()); stitcher.setFeaturesFinder(new detail::SurfFeaturesFinderGpu());
#else #else
stitcher.setFeaturesFinder(new detail::OrbFeaturesFinder()); stitcher.setFeaturesFinder(new detail::OrbFeaturesFinder());
...@@ -72,7 +72,7 @@ Stitcher Stitcher::createDefault(bool try_use_gpu) ...@@ -72,7 +72,7 @@ Stitcher Stitcher::createDefault(bool try_use_gpu)
else else
#endif #endif
{ {
#if HAVE_OPENCV_NONFREE #ifdef HAVE_OPENCV_NONFREE
stitcher.setFeaturesFinder(new detail::SurfFeaturesFinder()); stitcher.setFeaturesFinder(new detail::SurfFeaturesFinder());
#else #else
stitcher.setFeaturesFinder(new detail::OrbFeaturesFinder()); stitcher.setFeaturesFinder(new detail::OrbFeaturesFinder());
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include "test_precomp.hpp" #include "test_precomp.hpp"
#include "opencv2/opencv_modules.hpp" #include "opencv2/opencv_modules.hpp"
#if HAVE_OPENCV_NONFREE #ifdef HAVE_OPENCV_NONFREE
using namespace cv; using namespace cv;
using namespace std; using namespace std;
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
#include "opencv2/videostab/motion_core.hpp" #include "opencv2/videostab/motion_core.hpp"
#include "opencv2/videostab/outlier_rejection.hpp" #include "opencv2/videostab/outlier_rejection.hpp"
#if HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
#include "opencv2/gpu/gpu.hpp" #include "opencv2/gpu/gpu.hpp"
#endif #endif
...@@ -200,7 +200,7 @@ private: ...@@ -200,7 +200,7 @@ private:
std::vector<Point2f> pointsPrevGood_, pointsGood_; std::vector<Point2f> pointsPrevGood_, pointsGood_;
}; };
#if HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
class CV_EXPORTS KeypointBasedMotionEstimatorGpu : public ImageMotionEstimatorBase class CV_EXPORTS KeypointBasedMotionEstimatorGpu : public ImageMotionEstimatorBase
{ {
public: public:
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#include "opencv2/core/core.hpp" #include "opencv2/core/core.hpp"
#include "opencv2/opencv_modules.hpp" #include "opencv2/opencv_modules.hpp"
#if HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
#include "opencv2/gpu/gpu.hpp" #include "opencv2/gpu/gpu.hpp"
#endif #endif
...@@ -99,7 +99,7 @@ public: ...@@ -99,7 +99,7 @@ public:
OutputArray status, OutputArray errors); OutputArray status, OutputArray errors);
}; };
#if HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
class CV_EXPORTS SparsePyrLkOptFlowEstimatorGpu class CV_EXPORTS SparsePyrLkOptFlowEstimatorGpu
: public PyrLkOptFlowEstimatorBase, public ISparseOptFlowEstimator : public PyrLkOptFlowEstimatorBase, public ISparseOptFlowEstimator
{ {
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#include "opencv2/videostab/global_motion.hpp" #include "opencv2/videostab/global_motion.hpp"
#include "opencv2/videostab/log.hpp" #include "opencv2/videostab/log.hpp"
#if HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
#include "opencv2/gpu/gpu.hpp" #include "opencv2/gpu/gpu.hpp"
#endif #endif
...@@ -119,7 +119,7 @@ private: ...@@ -119,7 +119,7 @@ private:
Mat_<float> mapx_, mapy_; Mat_<float> mapx_, mapy_;
}; };
#if HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
class CV_EXPORTS MoreAccurateMotionWobbleSuppressorGpu : public MoreAccurateMotionWobbleSuppressorBase class CV_EXPORTS MoreAccurateMotionWobbleSuppressorGpu : public MoreAccurateMotionWobbleSuppressorBase
{ {
public: public:
......
...@@ -686,7 +686,7 @@ Mat KeypointBasedMotionEstimator::estimate(const Mat &frame0, const Mat &frame1, ...@@ -686,7 +686,7 @@ Mat KeypointBasedMotionEstimator::estimate(const Mat &frame0, const Mat &frame1,
} }
#if HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
KeypointBasedMotionEstimatorGpu::KeypointBasedMotionEstimatorGpu(Ptr<MotionEstimatorBase> estimator) KeypointBasedMotionEstimatorGpu::KeypointBasedMotionEstimatorGpu(Ptr<MotionEstimatorBase> estimator)
: ImageMotionEstimatorBase(estimator->motionModel()), motionEstimator_(estimator) : ImageMotionEstimatorBase(estimator->motionModel()), motionEstimator_(estimator)
{ {
......
...@@ -325,7 +325,7 @@ public: ...@@ -325,7 +325,7 @@ public:
MotionInpainter::MotionInpainter() MotionInpainter::MotionInpainter()
{ {
#if HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
setOptFlowEstimator(new DensePyrLkOptFlowEstimatorGpu()); setOptFlowEstimator(new DensePyrLkOptFlowEstimatorGpu());
#else #else
CV_Error(CV_StsNotImplemented, "Current implementation of MotionInpainter requires GPU"); CV_Error(CV_StsNotImplemented, "Current implementation of MotionInpainter requires GPU");
......
...@@ -60,7 +60,7 @@ void SparsePyrLkOptFlowEstimator::run( ...@@ -60,7 +60,7 @@ void SparsePyrLkOptFlowEstimator::run(
} }
#if HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
SparsePyrLkOptFlowEstimatorGpu::SparsePyrLkOptFlowEstimatorGpu() SparsePyrLkOptFlowEstimatorGpu::SparsePyrLkOptFlowEstimatorGpu()
{ {
CV_Assert(gpu::getCudaEnabledDeviceCount() > 0); CV_Assert(gpu::getCudaEnabledDeviceCount() > 0);
...@@ -135,7 +135,7 @@ void DensePyrLkOptFlowEstimatorGpu::run( ...@@ -135,7 +135,7 @@ void DensePyrLkOptFlowEstimatorGpu::run(
flowX_.download(flowX.getMatRef()); flowX_.download(flowX.getMatRef());
flowY_.download(flowY.getMatRef()); flowY_.download(flowY.getMatRef());
} }
#endif // #if HAVE_OPENCV_GPU #endif // HAVE_OPENCV_GPU
} // namespace videostab } // namespace videostab
} // namespace cv } // namespace cv
...@@ -115,7 +115,7 @@ void MoreAccurateMotionWobbleSuppressor::suppress(int idx, const Mat &frame, Mat ...@@ -115,7 +115,7 @@ void MoreAccurateMotionWobbleSuppressor::suppress(int idx, const Mat &frame, Mat
} }
#if HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
void MoreAccurateMotionWobbleSuppressorGpu::suppress(int idx, const gpu::GpuMat &frame, gpu::GpuMat &result) void MoreAccurateMotionWobbleSuppressorGpu::suppress(int idx, const gpu::GpuMat &frame, gpu::GpuMat &result)
{ {
CV_Assert(motions_ && stabilizationMotions_); CV_Assert(motions_ && stabilizationMotions_);
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
add_custom_target(opencv_android_examples) add_custom_target(opencv_android_examples)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations)
add_subdirectory(15-puzzle) add_subdirectory(15-puzzle)
add_subdirectory(face-detection) add_subdirectory(face-detection)
add_subdirectory(image-manipulations) add_subdirectory(image-manipulations)
......
...@@ -215,7 +215,7 @@ public: ...@@ -215,7 +215,7 @@ public:
outlierRejector = tblor; outlierRejector = tblor;
} }
#if HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
if (gpu) if (gpu)
{ {
KeypointBasedMotionEstimatorGpu *kbest = new KeypointBasedMotionEstimatorGpu(est); KeypointBasedMotionEstimatorGpu *kbest = new KeypointBasedMotionEstimatorGpu(est);
...@@ -256,7 +256,7 @@ public: ...@@ -256,7 +256,7 @@ public:
outlierRejector = tblor; outlierRejector = tblor;
} }
#if HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
if (gpu) if (gpu)
{ {
KeypointBasedMotionEstimatorGpu *kbest = new KeypointBasedMotionEstimatorGpu(est); KeypointBasedMotionEstimatorGpu *kbest = new KeypointBasedMotionEstimatorGpu(est);
...@@ -341,7 +341,7 @@ int main(int argc, const char **argv) ...@@ -341,7 +341,7 @@ int main(int argc, const char **argv)
return 0; return 0;
} }
#if HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
if (arg("gpu") == "yes") if (arg("gpu") == "yes")
{ {
cout << "initializing GPU..."; cout.flush(); cout << "initializing GPU..."; cout.flush();
...@@ -419,7 +419,7 @@ int main(int argc, const char **argv) ...@@ -419,7 +419,7 @@ int main(int argc, const char **argv)
{ {
MoreAccurateMotionWobbleSuppressorBase *ws = new MoreAccurateMotionWobbleSuppressor(); MoreAccurateMotionWobbleSuppressorBase *ws = new MoreAccurateMotionWobbleSuppressor();
if (arg("gpu") == "yes") if (arg("gpu") == "yes")
#if HAVE_OPENCV_GPU #ifdef HAVE_OPENCV_GPU
ws = new MoreAccurateMotionWobbleSuppressorGpu(); ws = new MoreAccurateMotionWobbleSuppressorGpu();
#else #else
throw runtime_error("OpenCV is built without GPU support"); throw runtime_error("OpenCV is built without GPU support");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment