build: eliminate ICC warnings
This commit is contained in:
parent
540ece74a5
commit
dbbbad40fb
@ -436,6 +436,12 @@ if(MSVC)
|
|||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4275) # non dll-interface class 'std::exception' used as base for dll-interface class 'cv::Exception'
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4275) # non dll-interface class 'std::exception' used as base for dll-interface class 'cv::Exception'
|
||||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4589) # Constructor of abstract class 'cv::ORB' ignores initializer for virtual base class 'cv::Algorithm'
|
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4589) # Constructor of abstract class 'cv::ORB' ignores initializer for virtual base class 'cv::Algorithm'
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CV_ICC AND NOT ENABLE_NOISY_WARNINGS)
|
||||||
|
foreach(flags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_DEBUG)
|
||||||
|
string(REGEX REPLACE "( |^)/W[0-9]+( |$)" "\\1\\2" ${flags} "${${flags}}")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE AND NOT CMAKE_CROSSCOMPILING AND NOT DEFINED ENV{LDFLAGS} AND EXISTS "/usr/local/lib")
|
if(APPLE AND NOT CMAKE_CROSSCOMPILING AND NOT DEFINED ENV{LDFLAGS} AND EXISTS "/usr/local/lib")
|
||||||
|
|||||||
@ -1,9 +1,5 @@
|
|||||||
#include "test_precomp.hpp"
|
#include "test_precomp.hpp"
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#ifndef NAN
|
|
||||||
#include <limits> // numeric_limits<T>::quiet_NaN()
|
|
||||||
#define NAN std::numeric_limits<float>::quiet_NaN()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -1895,7 +1891,7 @@ TEST(MinMaxLoc, regression_4955_nans)
|
|||||||
cv::Mat one_mat(2, 2, CV_32F, cv::Scalar(1));
|
cv::Mat one_mat(2, 2, CV_32F, cv::Scalar(1));
|
||||||
cv::minMaxLoc(one_mat, NULL, NULL, NULL, NULL);
|
cv::minMaxLoc(one_mat, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
cv::Mat nan_mat(2, 2, CV_32F, cv::Scalar(NAN));
|
cv::Mat nan_mat(2, 2, CV_32F, cv::Scalar(std::numeric_limits<float>::quiet_NaN()));
|
||||||
cv::minMaxLoc(nan_mat, NULL, NULL, NULL, NULL);
|
cv::minMaxLoc(nan_mat, NULL, NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user