Skip to content

Commit 29f5294

Browse files
committed
Merge pull request opencv#7808 from alalek:backport_7767
2 parents cf97e6e + ab260da commit 29f5294

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

3rdparty/openexr/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC))
4949
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
5050
endif()
5151

52+
if(MSVC AND CV_ICC)
53+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qrestrict")
54+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qrestrict")
55+
endif()
56+
5257
add_library(IlmImf STATIC ${lib_hdrs} ${lib_srcs})
5358
target_link_libraries(IlmImf ${ZLIB_LIBRARIES})
5459

cmake/OpenCVDetectCXXCompiler.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if(UNIX)
3838
endif()
3939
endif()
4040

41-
if(MSVC AND CMAKE_C_COMPILER MATCHES "icc")
41+
if(MSVC AND CMAKE_C_COMPILER MATCHES "icc|icl")
4242
set(CV_ICC __INTEL_COMPILER_FOR_WINDOWS)
4343
endif()
4444

0 commit comments

Comments
 (0)