mirror of
https://github.com/opencv/opencv.git
synced 2025-07-26 07:07:37 +08:00
cmake: filter NVCC compiler flags (Wimplicit-fallthrough, OPENCV_CUDA_NVCC_FILTEROUT_OPTIONS)
issue 11552
This commit is contained in:
parent
085b27fc3d
commit
d4a8a9ee96
@ -203,6 +203,16 @@ if(CUDA_FOUND)
|
|||||||
|
|
||||||
# cc1: warning: command line option '-Wsuggest-override' is valid for C++/ObjC++ but not for C
|
# cc1: warning: command line option '-Wsuggest-override' is valid for C++/ObjC++ but not for C
|
||||||
string(REPLACE "-Wsuggest-override" "" ${var} "${${var}}")
|
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()
|
endforeach()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user