mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
fixed two warnings in gpu sources (-Wshadow, -Wno-sign-promo)
This commit is contained in:
parent
e0d991cf46
commit
8b8c368148
@ -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}}")
|
||||
|
@ -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")
|
||||
|
@ -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)
|
||||
|
@ -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})
|
||||
|
Loading…
Reference in New Issue
Block a user