From bcf78daed209f0af49307879ec2cfca79b00fbbf Mon Sep 17 00:00:00 2001 From: Gregory Morse Date: Wed, 9 Dec 2015 03:45:10 +0100 Subject: [PATCH] Update CMakeLists.txt WinRT parallels library is causing conflicts in VC++ due to inconsistent usage with C++/CX which is now present in parallels.cpp. This support should be included in all projects with WinRT specific code except if doing special native C++ tasks. --- modules/core/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/core/CMakeLists.txt b/modules/core/CMakeLists.txt index 14fac578a6..1ac4c9e25d 100644 --- a/modules/core/CMakeLists.txt +++ b/modules/core/CMakeLists.txt @@ -11,6 +11,10 @@ if(WINRT AND CMAKE_SYSTEM_NAME MATCHES WindowsStore AND CMAKE_SYSTEM_VERSION MAT list(APPEND extra_libs ole32.lib) endif() +if(DEFINED WINRT AND NOT DEFINED ENABLE_WINRT_MODE_NATIVE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW") +endif() + if(HAVE_CUDA) ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wenum-compare -Wunused-function -Wshadow) endif() -- GitLab