mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
suppress warning on GCC 7 and later
This commit is contained in:
parent
3891b72f33
commit
a630ad73cb
4
3rdparty/openexr/CMakeLists.txt
vendored
4
3rdparty/openexr/CMakeLists.txt
vendored
@ -110,6 +110,10 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused -Wsign-compare -Wundef -W
|
||||
-Wreorder
|
||||
-Wunused-result
|
||||
)
|
||||
if(ARM AND CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
# suppress warnings from GCC only on 7.1 and later
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-psabi)
|
||||
endif()
|
||||
if(CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wclass-memaccess)
|
||||
endif()
|
||||
|
4
3rdparty/protobuf/CMakeLists.txt
vendored
4
3rdparty/protobuf/CMakeLists.txt
vendored
@ -25,6 +25,10 @@ else()
|
||||
-Warray-bounds # GCC 9+
|
||||
)
|
||||
endif()
|
||||
if(ARM AND CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
# suppress warnings from GCC only on 7.1 and later
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-psabi)
|
||||
endif()
|
||||
if(CV_ICC)
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS
|
||||
-wd265 -wd858 -wd873 -wd2196
|
||||
|
@ -3,6 +3,10 @@ set(debug_modules "")
|
||||
if(DEBUG_opencv_calib3d)
|
||||
list(APPEND debug_modules opencv_highgui)
|
||||
endif()
|
||||
if(ARM AND CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
# suppress warnings from GCC only on 7.1 and later
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-psabi)
|
||||
endif()
|
||||
ocv_define_module(calib3d opencv_imgproc opencv_features2d ${debug_modules}
|
||||
WRAP java python js
|
||||
)
|
||||
|
@ -38,6 +38,10 @@ endif()
|
||||
if(HAVE_CUDA)
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wenum-compare -Wunused-function -Wshadow)
|
||||
endif()
|
||||
if(ARM AND CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
# suppress warnings from GCC only on 7.1 and later
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-psabi)
|
||||
endif()
|
||||
|
||||
if(CV_TRACE AND HAVE_ITT)
|
||||
add_definitions(-DOPENCV_WITH_ITT=1)
|
||||
|
@ -35,6 +35,10 @@ else()
|
||||
-Wunused-parameter -Wsign-compare
|
||||
)
|
||||
endif()
|
||||
if(ARM AND CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
# suppress warnings from GCC only on 7.1 and later
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-psabi)
|
||||
endif()
|
||||
if(HAVE_CUDA)
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
|
||||
endif()
|
||||
|
@ -1,6 +1,10 @@
|
||||
set(the_description "2D Features Framework")
|
||||
|
||||
ocv_add_dispatched_file(sift SSE4_1 AVX2 AVX512_SKX)
|
||||
if(ARM AND CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
# suppress warnings from GCC only on 7.1 and later
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-psabi)
|
||||
endif()
|
||||
|
||||
set(debug_modules "")
|
||||
if(DEBUG_opencv_features2d)
|
||||
|
@ -1,2 +1,6 @@
|
||||
set(the_description "Clustering and Search in Multi-Dimensional Spaces")
|
||||
if(ARM AND CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
# suppress warnings from GCC only on 7.1 and later
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-psabi)
|
||||
endif()
|
||||
ocv_define_module(flann opencv_core WRAP python)
|
||||
|
@ -12,6 +12,10 @@ ocv_add_dispatched_file(smooth SSE2 SSE4_1 AVX2)
|
||||
ocv_add_dispatched_file(sumpixels SSE2 AVX2 AVX512_SKX)
|
||||
ocv_add_dispatched_file(undistort SSE2 AVX2)
|
||||
ocv_define_module(imgproc opencv_core WRAP java python js)
|
||||
if(ARM AND CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
# suppress warnings from GCC only on 7.1 and later
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-psabi)
|
||||
endif()
|
||||
|
||||
ocv_check_environment_variables(OPENCV_IPP_GAUSSIAN_BLUR)
|
||||
option(OPENCV_IPP_GAUSSIAN_BLUR "Enable IPP optimizations for GaussianBlur (+8Mb in binary size)" OFF)
|
||||
|
@ -1,2 +1,6 @@
|
||||
set(the_description "Machine Learning")
|
||||
if(ARM AND CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
# suppress warnings from GCC only on 7.1 and later
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-psabi)
|
||||
endif()
|
||||
ocv_define_module(ml opencv_core WRAP java python)
|
||||
|
@ -1,4 +1,8 @@
|
||||
set(the_description "Object Detection")
|
||||
if(ARM AND CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
# suppress warnings from GCC only on 7.1 and later
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-psabi)
|
||||
endif()
|
||||
ocv_define_module(objdetect opencv_core opencv_imgproc opencv_calib3d WRAP java python js)
|
||||
|
||||
if(HAVE_QUIRC)
|
||||
|
@ -1,2 +1,6 @@
|
||||
set(the_description "Shape descriptors and matchers")
|
||||
if(ARM AND CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
# suppress warnings from GCC only on 7.1 and later
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-psabi)
|
||||
endif()
|
||||
ocv_define_module(shape opencv_core opencv_imgproc opencv_video WRAP python)
|
||||
|
@ -3,6 +3,10 @@ set(the_description "Images stitching")
|
||||
if(HAVE_CUDA)
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations -Wshadow -Wstrict-aliasing)
|
||||
endif()
|
||||
if(ARM AND CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
# suppress warnings from GCC only on 7.1 and later
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-psabi)
|
||||
endif()
|
||||
|
||||
set(STITCHING_CONTRIB_DEPS "opencv_xfeatures2d")
|
||||
if(BUILD_SHARED_LIBS AND BUILD_opencv_world AND OPENCV_WORLD_EXCLUDE_EXTRA_MODULES)
|
||||
|
@ -15,6 +15,10 @@ if(WINRT)
|
||||
endif()
|
||||
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
|
||||
if(ARM AND CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
# suppress warnings from GCC only on 7.1 and later
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-psabi)
|
||||
endif()
|
||||
|
||||
ocv_add_module(ts INTERNAL opencv_core opencv_imgproc opencv_imgcodecs opencv_videoio opencv_highgui)
|
||||
|
||||
|
@ -41,6 +41,10 @@ foreach(sample_filename ${cpp_samples})
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Winconsistent-missing-override -Wsuggest-override)
|
||||
endif()
|
||||
endif()
|
||||
if(ARM AND CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
# suppress warnings from GCC only on 7.1 and later
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-psabi)
|
||||
endif()
|
||||
set(package "cpp")
|
||||
if(sample_filename MATCHES "tutorial_code")
|
||||
set(package "tutorial")
|
||||
|
Loading…
Reference in New Issue
Block a user