Commit 49e6bb29 authored by Alexander Alekhin's avatar Alexander Alekhin Committed by GitHub

Merge pull request #7868 from alalek:icc_2.4

(2.4) Build with ICC
parents 667cb2e9 041502e4
......@@ -97,6 +97,10 @@ if(BUILD_TINY_GPU_MODULE)
add_definitions(-DOPENCV_TINY_GPU_MODULE)
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)
......@@ -364,4 +368,10 @@ if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4589") # Constructor of abstract class ... ignores initializer for virtual base class 'cv::Algorithm'
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4359") # Alignment specifier is less than actual alignment (4), and will be ignored
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()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment