suppress warning on GCC 7 and later

pull/22202/head
Tomoaki Teshima 2 years ago
parent 3891b72f33
commit a630ad73cb
  1. 4
      3rdparty/openexr/CMakeLists.txt
  2. 4
      3rdparty/protobuf/CMakeLists.txt
  3. 4
      modules/calib3d/CMakeLists.txt
  4. 4
      modules/core/CMakeLists.txt
  5. 4
      modules/dnn/CMakeLists.txt
  6. 4
      modules/features2d/CMakeLists.txt
  7. 4
      modules/flann/CMakeLists.txt
  8. 4
      modules/imgproc/CMakeLists.txt
  9. 4
      modules/ml/CMakeLists.txt
  10. 4
      modules/objdetect/CMakeLists.txt
  11. 4
      modules/shape/CMakeLists.txt
  12. 4
      modules/stitching/CMakeLists.txt
  13. 4
      modules/ts/CMakeLists.txt
  14. 4
      samples/cpp/CMakeLists.txt

@ -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()

@ -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…
Cancel
Save