mirror of https://github.com/microsoft/vcpkg.git
15 lines
627 B
Diff
15 lines
627 B
Diff
diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake
|
|
index 5886f4f..5f294b5 100644
|
|
--- a/cmake/OpenCVUtils.cmake
|
|
+++ b/cmake/OpenCVUtils.cmake
|
|
@@ -1566,6 +1566,9 @@ macro(ocv_add_cuda_compile_flags)
|
|
target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:CUDA>: ${CUDA_NVCC_FLAGS}
|
|
"-Xcompiler=${CMAKE_CXX_FLAGS_CUDA} $<$<CONFIG:Debug>:${CMAKE_CXX_FLAGS_DEBUG_CUDA}> \
|
|
$<$<CONFIG:Release>:${CMAKE_CXX_FLAGS_RELEASE_CUDA}>" >)
|
|
+ if(MSVC)
|
|
+ target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=/Zc:preprocessor>)
|
|
+ endif()
|
|
endmacro()
|
|
|
|
function(ocv_add_executable target)
|