1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #7868 from alalek:icc_2.4

(2.4) Build with ICC
This commit is contained in:
Alexander Alekhin
2016-12-15 18:09:17 +02:00
committed by GitHub
+10
View File
@@ -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()