diff --git a/modules/aruco/CMakeLists.txt b/modules/aruco/CMakeLists.txt index 12467e88f..17f1da666 100644 --- a/modules/aruco/CMakeLists.txt +++ b/modules/aruco/CMakeLists.txt @@ -1,4 +1,8 @@ set(the_description "ArUco Marker 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(aruco opencv_core opencv_imgproc opencv_calib3d WRAP python java) ocv_include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/modules/ccalib/CMakeLists.txt b/modules/ccalib/CMakeLists.txt index f803322ba..446e7f433 100644 --- a/modules/ccalib/CMakeLists.txt +++ b/modules/ccalib/CMakeLists.txt @@ -1,2 +1,6 @@ set(the_description "Custom Calibration Pattern") +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(ccalib opencv_core opencv_imgproc opencv_calib3d opencv_features2d opencv_highgui WRAP python) diff --git a/modules/datasets/CMakeLists.txt b/modules/datasets/CMakeLists.txt index 56ca9e310..97606bb40 100644 --- a/modules/datasets/CMakeLists.txt +++ b/modules/datasets/CMakeLists.txt @@ -13,3 +13,7 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267 # flann, Win64 -Wimplicit-fallthrough # tinyxml2.cpp ) +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() diff --git a/modules/dnn_objdetect/CMakeLists.txt b/modules/dnn_objdetect/CMakeLists.txt index 895bffbed..c6aa4540b 100644 --- a/modules/dnn_objdetect/CMakeLists.txt +++ b/modules/dnn_objdetect/CMakeLists.txt @@ -1,5 +1,8 @@ set(the_description "Object Detection using CNNs") - +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(dnn_objdetect opencv_core opencv_imgproc opencv_dnn OPTIONAL opencv_highgui opencv_imgcodecs # samples ) diff --git a/modules/dpm/CMakeLists.txt b/modules/dpm/CMakeLists.txt index 4d6a302b7..090f90366 100644 --- a/modules/dpm/CMakeLists.txt +++ b/modules/dpm/CMakeLists.txt @@ -3,3 +3,7 @@ set(the_description "Object Detection") ocv_define_module(dpm opencv_core opencv_imgproc opencv_objdetect OPTIONAL opencv_highgui WRAP python) ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4512) # disable warning on Win64 +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() diff --git a/modules/face/CMakeLists.txt b/modules/face/CMakeLists.txt index 2d5f8075a..f7e5374d6 100644 --- a/modules/face/CMakeLists.txt +++ b/modules/face/CMakeLists.txt @@ -1,4 +1,8 @@ set(the_description "Face recognition etc") +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(face opencv_core opencv_imgproc opencv_objdetect diff --git a/modules/line_descriptor/CMakeLists.txt b/modules/line_descriptor/CMakeLists.txt index 0c18edf7d..fc3b31711 100644 --- a/modules/line_descriptor/CMakeLists.txt +++ b/modules/line_descriptor/CMakeLists.txt @@ -1,2 +1,6 @@ set(the_description "Line descriptor") +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(line_descriptor opencv_imgproc OPTIONAL opencv_features2d WRAP python) diff --git a/modules/optflow/CMakeLists.txt b/modules/optflow/CMakeLists.txt index 39a37f143..beee73384 100644 --- a/modules/optflow/CMakeLists.txt +++ b/modules/optflow/CMakeLists.txt @@ -1,2 +1,6 @@ set(the_description "Optical Flow Algorithms") +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(optflow opencv_core opencv_imgproc opencv_video opencv_ximgproc opencv_imgcodecs opencv_flann WRAP python) diff --git a/modules/rgbd/CMakeLists.txt b/modules/rgbd/CMakeLists.txt index f2e022fe8..643be62c7 100644 --- a/modules/rgbd/CMakeLists.txt +++ b/modules/rgbd/CMakeLists.txt @@ -1,2 +1,6 @@ set(the_description "RGBD algorithms") +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(rgbd opencv_core opencv_calib3d opencv_imgproc WRAP python) diff --git a/modules/text/CMakeLists.txt b/modules/text/CMakeLists.txt index 82e1e2a7e..36caffb5d 100644 --- a/modules/text/CMakeLists.txt +++ b/modules/text/CMakeLists.txt @@ -3,6 +3,10 @@ set(__extra_deps "") if(DEBUG_opencv_text) list(APPEND __extra_deps PRIVATE_REQUIRED 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(text opencv_ml opencv_imgproc opencv_core opencv_features2d opencv_dnn diff --git a/modules/tracking/CMakeLists.txt b/modules/tracking/CMakeLists.txt index 6fa88af29..50aae65a3 100644 --- a/modules/tracking/CMakeLists.txt +++ b/modules/tracking/CMakeLists.txt @@ -1,3 +1,7 @@ set(the_description "Tracking API") ocv_define_module(tracking opencv_imgproc opencv_core opencv_video opencv_plot OPTIONAL opencv_dnn opencv_datasets WRAP java python) ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-shadow /wd4458) +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() diff --git a/modules/xfeatures2d/CMakeLists.txt b/modules/xfeatures2d/CMakeLists.txt index bbc540e27..80b8c64ca 100644 --- a/modules/xfeatures2d/CMakeLists.txt +++ b/modules/xfeatures2d/CMakeLists.txt @@ -3,6 +3,10 @@ set(the_description "Contributed/Experimental Algorithms for Salient 2D Features if(HAVE_CUDA) ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef) 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(xfeatures2d opencv_core opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_shape opencv_ml opencv_cudaarithm WRAP python java) if(NOT OPENCV_SKIP_FEATURES2D_DOWNLOADING) diff --git a/modules/ximgproc/CMakeLists.txt b/modules/ximgproc/CMakeLists.txt index f6f88bec6..b6699eeb4 100644 --- a/modules/ximgproc/CMakeLists.txt +++ b/modules/ximgproc/CMakeLists.txt @@ -1,2 +1,6 @@ set(the_description "Extended image processing module. It includes edge-aware filters and etc.") +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(ximgproc opencv_core opencv_imgproc opencv_calib3d opencv_imgcodecs WRAP python java) diff --git a/modules/xobjdetect/CMakeLists.txt b/modules/xobjdetect/CMakeLists.txt index 1727a42b7..56b1749bb 100644 --- a/modules/xobjdetect/CMakeLists.txt +++ b/modules/xobjdetect/CMakeLists.txt @@ -1,4 +1,8 @@ set(the_description "Object detection algorithms") +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(xobjdetect opencv_core opencv_imgproc opencv_objdetect opencv_imgcodecs WRAP python) if (BUILD_opencv_apps AND NOT APPLE_FRAMEWORK) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tools ${CMAKE_CURRENT_BINARY_DIR}/tools) diff --git a/modules/xphoto/CMakeLists.txt b/modules/xphoto/CMakeLists.txt index a05848d38..877384378 100644 --- a/modules/xphoto/CMakeLists.txt +++ b/modules/xphoto/CMakeLists.txt @@ -1,2 +1,6 @@ set(the_description "Addon to basic photo module") +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(xphoto opencv_core opencv_imgproc opencv_photo WRAP python java)