mirror of
https://github.com/opencv/opencv.git
synced 2024-12-01 14:59:54 +08:00
Merge pull request #12097 from xsacha:master
This commit is contained in:
commit
183cfd3a2e
@ -3,7 +3,7 @@ if(WIN32 AND NOT MSVC)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT APPLE AND CV_CLANG)
|
||||
if(NOT UNIX AND CV_CLANG)
|
||||
message(STATUS "CUDA compilation is disabled (due to Clang unsupported on your platform).")
|
||||
return()
|
||||
endif()
|
||||
@ -188,6 +188,13 @@ if(CUDA_FOUND)
|
||||
foreach(var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG)
|
||||
set(${var}_backup_in_cuda_compile_ "${${var}}")
|
||||
|
||||
if (CV_CLANG)
|
||||
# we remove -Winconsistent-missing-override and -Qunused-arguments
|
||||
# just in case we are compiling CUDA with gcc but OpenCV with clang
|
||||
string(REPLACE "-Winconsistent-missing-override" "" ${var} "${${var}}")
|
||||
string(REPLACE "-Qunused-arguments" "" ${var} "${${var}}")
|
||||
endif()
|
||||
|
||||
# we remove /EHa as it generates warnings under windows
|
||||
string(REPLACE "/EHa" "" ${var} "${${var}}")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user