diff --git a/samples/gpu/multi.cpp b/samples/gpu/multi.cpp index 94fcb86654..7c42b3cd8a 100644 --- a/samples/gpu/multi.cpp +++ b/samples/gpu/multi.cpp @@ -2,7 +2,9 @@ on the different GPUs */ // Disable some warnings which are caused with CUDA headers +#if defined(_MSC_VER) #pragma warning(disable: 4201 4408 4100) +#endif #include #include diff --git a/samples/gpu/stereo_multi.cpp b/samples/gpu/stereo_multi.cpp index 543d964e03..8a57f4949f 100644 --- a/samples/gpu/stereo_multi.cpp +++ b/samples/gpu/stereo_multi.cpp @@ -3,7 +3,9 @@ GPUs. */ // Disable some warnings which are caused with CUDA headers +#if defined(_MSC_VER) #pragma warning(disable: 4201 4408 4100) +#endif #include #include