fixed two warnings in gpu sources (-Wshadow, -Wno-sign-promo)
authorVladislav Vinogradov <vlad.vinogradov@itseez.com>
Fri, 14 Feb 2014 13:56:03 +0000 (17:56 +0400)
committerVladislav Vinogradov <vlad.vinogradov@itseez.com>
Fri, 14 Feb 2014 13:56:03 +0000 (17:56 +0400)
cmake/OpenCVDetectCUDA.cmake
modules/core/CMakeLists.txt
modules/nonfree/CMakeLists.txt
modules/superres/CMakeLists.txt

index b35a797..56b1429 100644 (file)
@@ -180,6 +180,9 @@ if(CUDA_FOUND)
       # we remove -Wsign-promo as it generates warnings under linux
       string(REPLACE "-Wsign-promo" "" ${var} "${${var}}")
 
+      # we remove -Wno-sign-promo as it generates warnings under linux
+      string(REPLACE "-Wno-sign-promo" "" ${var} "${${var}}")
+
       # we remove -Wno-delete-non-virtual-dtor because it's used for C++ compiler
       # but NVCC uses C compiler by default
       string(REPLACE "-Wno-delete-non-virtual-dtor" "" ${var} "${${var}}")
index fe3eff3..d9de52d 100644 (file)
@@ -25,7 +25,7 @@ endif()
 
 if(HAVE_CUDA)
   ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpu/include")
-  ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
+  ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wshadow)
 endif()
 
 file(GLOB lib_cuda_hdrs        "include/opencv2/${name}/cuda/*.hpp"        "include/opencv2/${name}/cuda/*.h")
index 53fb2f7..b43273b 100644 (file)
@@ -3,7 +3,7 @@ if(BUILD_ANDROID_PACKAGE)
 endif()
 
 set(the_description "Functionality with possible limitations on the use")
-ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
+ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wshadow)
 if(ENABLE_DYNAMIC_CUDA)
   add_definitions(-DDYNAMIC_CUDA_SUPPORT)
   ocv_define_module(nonfree opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_ocl)
index 3da8dc2..82c61cc 100644 (file)
@@ -3,5 +3,5 @@ if(ANDROID OR IOS)
 endif()
 
 set(the_description "Super Resolution")
-ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 -Wundef)
+ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 -Wundef -Wshadow)
 ocv_define_module(superres opencv_imgproc opencv_video OPTIONAL opencv_gpu opencv_highgui opencv_ocl ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})