[opencv] 62/89: Fixed Intel C++ 17 build in VS2015
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Sat May 13 09:57:26 UTC 2017
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 2.4.13.2
in repository opencv.
commit ab260dafd22c54221c925c64f5cc168f9906f1fe
Author: Maksim Shabunin <maksim.shabunin at gmail.com>
Date: Thu Dec 1 16:41:21 2016 +0300
Fixed Intel C++ 17 build in VS2015
---
3rdparty/openexr/CMakeLists.txt | 5 +++++
cmake/OpenCVDetectCXXCompiler.cmake | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/3rdparty/openexr/CMakeLists.txt b/3rdparty/openexr/CMakeLists.txt
index dddf373..194d46f 100644
--- a/3rdparty/openexr/CMakeLists.txt
+++ b/3rdparty/openexr/CMakeLists.txt
@@ -49,6 +49,11 @@ if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
endif()
+if(MSVC AND CV_ICC)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qrestrict")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qrestrict")
+endif()
+
add_library(IlmImf STATIC ${lib_hdrs} ${lib_srcs})
target_link_libraries(IlmImf ${ZLIB_LIBRARIES})
diff --git a/cmake/OpenCVDetectCXXCompiler.cmake b/cmake/OpenCVDetectCXXCompiler.cmake
index b53f8d7..a2c427c 100644
--- a/cmake/OpenCVDetectCXXCompiler.cmake
+++ b/cmake/OpenCVDetectCXXCompiler.cmake
@@ -38,7 +38,7 @@ if(UNIX)
endif()
endif()
-if(MSVC AND CMAKE_C_COMPILER MATCHES "icc")
+if(MSVC AND CMAKE_C_COMPILER MATCHES "icc|icl")
set(CV_ICC __INTEL_COMPILER_FOR_WINDOWS)
endif()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list