提交 183cfd3a 编写于 作者: A Alexander Alekhin

Merge pull request #12097 from xsacha:master

......@@ -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}}")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册