From 45d04175d4211254105cebfe6304805eb48a6823 Mon Sep 17 00:00:00 2001 From: cudawarped <12133430+cudawarped@users.noreply.github.com> Date: Wed, 16 Nov 2022 11:14:17 +0200 Subject: [PATCH] Suppress warning #1394-D: field of class type without a DLL interface used in a class with a DLL interface from windows CUDA builds. --- cmake/OpenCVDetectCUDA.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/OpenCVDetectCUDA.cmake b/cmake/OpenCVDetectCUDA.cmake index 69d0455cc8..275fdb6f71 100644 --- a/cmake/OpenCVDetectCUDA.cmake +++ b/cmake/OpenCVDetectCUDA.cmake @@ -421,6 +421,10 @@ if(CUDA_FOUND) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fno-finite-math-only) endif() + if(WIN32) + set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcudafe --display_error_number --diag-suppress 1394,1388) + endif() + if(CMAKE_CROSSCOMPILING AND (ARM OR AARCH64)) set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xlinker --unresolved-symbols=ignore-in-shared-libs) endif()