Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
f7d956ea
Commit
f7d956ea
authored
Dec 15, 2016
by
Alexander Alekhin
Committed by
GitHub
Dec 15, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7869 from alalek:icc
Build with ICC
parents
a8c7a102
737fa519
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
8 deletions
+34
-8
OpenCVCompilerOptions.cmake
cmake/OpenCVCompilerOptions.cmake
+11
-0
OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+19
-0
test_arithm.cpp
modules/core/test/test_arithm.cpp
+1
-5
test_cascadeandhog.cpp
modules/objdetect/test/test_cascadeandhog.cpp
+3
-3
No files found.
cmake/OpenCVCompilerOptions.cmake
View file @
f7d956ea
...
...
@@ -101,6 +101,10 @@ if(MINGW)
endif
()
endif
()
if
(
CV_ICC AND NOT ENABLE_FAST_MATH
)
add_extra_compiler_option
(
"-fp-model precise"
)
endif
()
if
(
CMAKE_COMPILER_IS_GNUCXX
)
# High level of warnings.
add_extra_compiler_option
(
-W
)
...
...
@@ -432,6 +436,13 @@ 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 /wd4589
)
# Constructor of abstract class 'cv::ORB' ignores initializer for virtual base class 'cv::Algorithm'
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
()
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/Qwd673"
)
# PCH warning
endif
()
endif
()
if
(
APPLE AND NOT CMAKE_CROSSCOMPILING AND NOT DEFINED ENV{LDFLAGS} AND EXISTS
"/usr/local/lib"
)
...
...
cmake/OpenCVUtils.cmake
View file @
f7d956ea
...
...
@@ -302,6 +302,7 @@ macro(ocv_warnings_disable)
set
(
_flag_vars
""
)
set
(
_msvc_warnings
""
)
set
(
_gxx_warnings
""
)
set
(
_icc_warnings
""
)
foreach
(
arg
${
ARGN
}
)
if
(
arg MATCHES
"^CMAKE_"
)
list
(
APPEND _flag_vars
${
arg
}
)
...
...
@@ -309,6 +310,8 @@ macro(ocv_warnings_disable)
list
(
APPEND _msvc_warnings
${
arg
}
)
elseif
(
arg MATCHES
"^-W"
)
list
(
APPEND _gxx_warnings
${
arg
}
)
elseif
(
arg MATCHES
"^-wd"
OR arg MATCHES
"^-Qwd"
OR arg MATCHES
"^/Qwd"
)
list
(
APPEND _icc_warnings
${
arg
}
)
endif
()
endforeach
()
if
(
MSVC AND _msvc_warnings AND _flag_vars
)
...
...
@@ -331,9 +334,25 @@ macro(ocv_warnings_disable)
endforeach
()
endforeach
()
endif
()
if
(
CV_ICC AND _icc_warnings AND _flag_vars
)
foreach
(
var
${
_flag_vars
}
)
foreach
(
warning
${
_icc_warnings
}
)
if
(
UNIX
)
string
(
REPLACE
"-Qwd"
"-wd"
warning
"
${
warning
}
"
)
else
()
string
(
REPLACE
"-wd"
"-Qwd"
warning
"
${
warning
}
"
)
endif
()
ocv_check_flag_support
(
${
var
}
"
${
warning
}
"
_varname
)
if
(
${
_varname
}
)
set
(
${
var
}
"
${${
var
}}
${
warning
}
"
)
endif
()
endforeach
()
endforeach
()
endif
()
unset
(
_flag_vars
)
unset
(
_msvc_warnings
)
unset
(
_gxx_warnings
)
unset
(
_icc_warnings
)
endif
(
NOT ENABLE_NOISY_WARNINGS
)
endmacro
()
...
...
modules/core/test/test_arithm.cpp
View file @
f7d956ea
#include "test_precomp.hpp"
#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
std
;
...
...
@@ -1895,7 +1891,7 @@ TEST(MinMaxLoc, regression_4955_nans)
cv
::
Mat
one_mat
(
2
,
2
,
CV_32F
,
cv
::
Scalar
(
1
));
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
);
}
...
...
modules/objdetect/test/test_cascadeandhog.cpp
View file @
f7d956ea
...
...
@@ -1087,7 +1087,7 @@ void HOGDescriptorTester::detect(const Mat& img,
}
const
double
eps
=
FLT_EPSILON
*
100
;
double
diff_norm
=
cvtest
::
norm
(
actual_weights
,
weights
,
NORM_L2
);
double
diff_norm
=
cvtest
::
norm
(
actual_weights
,
weights
,
NORM_L2
+
NORM_RELATIVE
);
if
(
diff_norm
>
eps
)
{
ts
->
printf
(
cvtest
::
TS
::
SUMMARY
,
"Weights for found locations aren't equal.
\n
"
...
...
@@ -1167,7 +1167,7 @@ void HOGDescriptorTester::compute(InputArray _img, vector<float>& descriptors,
std
::
vector
<
float
>
actual_descriptors
;
actual_hog
->
compute
(
img
,
actual_descriptors
,
winStride
,
padding
,
locations
);
double
diff_norm
=
cvtest
::
norm
(
actual_descriptors
,
descriptors
,
NORM_L2
);
double
diff_norm
=
cvtest
::
norm
(
actual_descriptors
,
descriptors
,
NORM_L2
+
NORM_RELATIVE
);
const
double
eps
=
FLT_EPSILON
*
100
;
if
(
diff_norm
>
eps
)
{
...
...
@@ -1316,7 +1316,7 @@ void HOGDescriptorTester::computeGradient(const Mat& img, Mat& grad, Mat& qangle
const
double
eps
=
FLT_EPSILON
*
100
;
for
(
i
=
0
;
i
<
2
;
++
i
)
{
double
diff_norm
=
cvtest
::
norm
(
reference_mats
[
i
],
actual_mats
[
i
],
NORM_L2
);
double
diff_norm
=
cvtest
::
norm
(
actual_mats
[
i
],
reference_mats
[
i
],
NORM_L2
+
NORM_RELATIVE
);
if
(
diff_norm
>
eps
)
{
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"%s matrices are not equal
\n
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment