Commit d4a8a9ee authored by Alexander Alekhin's avatar Alexander Alekhin

cmake: filter NVCC compiler flags (Wimplicit-fallthrough, OPENCV_CUDA_NVCC_FILTEROUT_OPTIONS)

issue 11552
parent 085b27fc
......@@ -203,6 +203,16 @@ if(CUDA_FOUND)
# cc1: warning: command line option '-Wsuggest-override' is valid for C++/ObjC++ but not for C
string(REPLACE "-Wsuggest-override" "" ${var} "${${var}}")
# issue: #11552 (from OpenCVCompilerOptions.cmake)
string(REGEX REPLACE "-Wimplicit-fallthrough(=[0-9]+)? " "" ${var} "${${var}}")
# removal of custom specified options
if(OPENCV_CUDA_NVCC_FILTEROUT_OPTIONS)
foreach(__flag ${OPENCV_CUDA_NVCC_FILTEROUT_OPTIONS})
string(REPLACE "${__flag}" "" ${var} "${${var}}")
endforeach()
endif()
endforeach()
endmacro()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment