From ee0dd4d4967082c6bf3e4ba8d8bb3871720a7ec8 Mon Sep 17 00:00:00 2001 From: "marina.kolpakova" Date: Mon, 20 Aug 2012 23:35:29 +0400 Subject: [PATCH] disabled -Wunused-but-set-variable because of multiple warnings during building nvcc auto generated files (GCC 4.6) --- cmake/OpenCVDetectCUDA.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/OpenCVDetectCUDA.cmake b/cmake/OpenCVDetectCUDA.cmake index 60d800547..43e9c819a 100644 --- a/cmake/OpenCVDetectCUDA.cmake +++ b/cmake/OpenCVDetectCUDA.cmake @@ -88,7 +88,11 @@ if(CUDA_FOUND) if(APPLE) set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fno-finite-math-only) endif() - string(REPLACE "-Wsign-promo" "" CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}") + + # disabled because of multiple warnings during building nvcc auto generated files + if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_GCC_REGEX_VERSION VERSION_GREATER "4.6.0") + ocv_warnings_disable(CMAKE_CXX_FLAGS -Wunused-but-set-variable) + endif() # we remove -ggdb3 flag as it leads to preprocessor errors when compiling CUDA files (CUDA 4.1) set(CMAKE_CXX_FLAGS_DEBUG_ ${CMAKE_CXX_FLAGS_DEBUG})