From 44b2f9637a7cac9069de276076db95a0d433a142 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Sun, 7 Aug 2022 15:43:10 +0300 Subject: [PATCH] Revert "suppress warning on GCC 7 and later" This reverts commit a630ad73cb5dde7f8c69e86094bd4a1070ff0249. --- 3rdparty/openexr/CMakeLists.txt | 4 ---- 3rdparty/protobuf/CMakeLists.txt | 4 ---- modules/calib3d/CMakeLists.txt | 4 ---- modules/core/CMakeLists.txt | 4 ---- modules/dnn/CMakeLists.txt | 4 ---- modules/features2d/CMakeLists.txt | 4 ---- modules/flann/CMakeLists.txt | 4 ---- modules/imgproc/CMakeLists.txt | 4 ---- modules/ml/CMakeLists.txt | 4 ---- modules/objdetect/CMakeLists.txt | 4 ---- modules/shape/CMakeLists.txt | 4 ---- modules/stitching/CMakeLists.txt | 4 ---- modules/ts/CMakeLists.txt | 4 ---- samples/cpp/CMakeLists.txt | 4 ---- 14 files changed, 56 deletions(-) diff --git a/3rdparty/openexr/CMakeLists.txt b/3rdparty/openexr/CMakeLists.txt index 1fbfa4f857..88f60b23c0 100644 --- a/3rdparty/openexr/CMakeLists.txt +++ b/3rdparty/openexr/CMakeLists.txt @@ -110,10 +110,6 @@ 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() diff --git a/3rdparty/protobuf/CMakeLists.txt b/3rdparty/protobuf/CMakeLists.txt index f8372dc1ad..f249d2dcc3 100644 --- a/3rdparty/protobuf/CMakeLists.txt +++ b/3rdparty/protobuf/CMakeLists.txt @@ -25,10 +25,6 @@ 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 diff --git a/modules/calib3d/CMakeLists.txt b/modules/calib3d/CMakeLists.txt index 1c31ad1903..a38fdf18d8 100644 --- a/modules/calib3d/CMakeLists.txt +++ b/modules/calib3d/CMakeLists.txt @@ -3,10 +3,6 @@ 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 ) diff --git a/modules/core/CMakeLists.txt b/modules/core/CMakeLists.txt index 568a8afef1..beba9f804e 100644 --- a/modules/core/CMakeLists.txt +++ b/modules/core/CMakeLists.txt @@ -38,10 +38,6 @@ 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) diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt index 680be360ba..4019356392 100644 --- a/modules/dnn/CMakeLists.txt +++ b/modules/dnn/CMakeLists.txt @@ -35,10 +35,6 @@ 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() diff --git a/modules/features2d/CMakeLists.txt b/modules/features2d/CMakeLists.txt index 28af58565b..1d29320a14 100644 --- a/modules/features2d/CMakeLists.txt +++ b/modules/features2d/CMakeLists.txt @@ -1,10 +1,6 @@ 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) diff --git a/modules/flann/CMakeLists.txt b/modules/flann/CMakeLists.txt index 5935f679d4..78e041129b 100644 --- a/modules/flann/CMakeLists.txt +++ b/modules/flann/CMakeLists.txt @@ -1,6 +1,2 @@ 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) diff --git a/modules/imgproc/CMakeLists.txt b/modules/imgproc/CMakeLists.txt index 5787ec502c..3b45482481 100644 --- a/modules/imgproc/CMakeLists.txt +++ b/modules/imgproc/CMakeLists.txt @@ -12,10 +12,6 @@ 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) diff --git a/modules/ml/CMakeLists.txt b/modules/ml/CMakeLists.txt index 8b76e0c8ad..1b64cc4f17 100644 --- a/modules/ml/CMakeLists.txt +++ b/modules/ml/CMakeLists.txt @@ -1,6 +1,2 @@ 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) diff --git a/modules/objdetect/CMakeLists.txt b/modules/objdetect/CMakeLists.txt index 34b77eab6b..414e578099 100644 --- a/modules/objdetect/CMakeLists.txt +++ b/modules/objdetect/CMakeLists.txt @@ -1,8 +1,4 @@ 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) diff --git a/modules/shape/CMakeLists.txt b/modules/shape/CMakeLists.txt index 209eb11f34..527a0c2f71 100644 --- a/modules/shape/CMakeLists.txt +++ b/modules/shape/CMakeLists.txt @@ -1,6 +1,2 @@ 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) diff --git a/modules/stitching/CMakeLists.txt b/modules/stitching/CMakeLists.txt index 7ea34a1608..44f35eb59b 100644 --- a/modules/stitching/CMakeLists.txt +++ b/modules/stitching/CMakeLists.txt @@ -3,10 +3,6 @@ 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) diff --git a/modules/ts/CMakeLists.txt b/modules/ts/CMakeLists.txt index fd6e008333..f95bed0793 100644 --- a/modules/ts/CMakeLists.txt +++ b/modules/ts/CMakeLists.txt @@ -15,10 +15,6 @@ 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) diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt index 8cb11c0222..6ae9586fd4 100644 --- a/samples/cpp/CMakeLists.txt +++ b/samples/cpp/CMakeLists.txt @@ -41,10 +41,6 @@ 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")