Skip to content

Commit 49e6bb2

Browse files
authored
Merge pull request opencv#7868 from alalek:icc_2.4
(2.4) Build with ICC
2 parents 667cb2e + 041502e commit 49e6bb2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cmake/OpenCVCompilerOptions.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ if(BUILD_TINY_GPU_MODULE)
9797
add_definitions(-DOPENCV_TINY_GPU_MODULE)
9898
endif()
9999

100+
if(CV_ICC AND NOT ENABLE_FAST_MATH)
101+
add_extra_compiler_option("-fp-model precise")
102+
endif()
103+
100104
if(CMAKE_COMPILER_IS_GNUCXX)
101105
# High level of warnings.
102106
add_extra_compiler_option(-W)
@@ -364,4 +368,10 @@ if(MSVC)
364368
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4589") # Constructor of abstract class ... ignores initializer for virtual base class 'cv::Algorithm'
365369
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4359") # Alignment specifier is less than actual alignment (4), and will be ignored
366370
endif()
371+
372+
if(CV_ICC AND NOT ENABLE_NOISY_WARNINGS)
373+
foreach(flags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_DEBUG)
374+
string(REGEX REPLACE "( |^)/W[0-9]+( |$)" "\\1\\2" ${flags} "${${flags}}")
375+
endforeach()
376+
endif()
367377
endif()

0 commit comments

Comments
 (0)