Merge pull request #24799 from cudawarped:fix_24789

`cuda`: Fix 24789 (Cannot build opencv 4.9 with test module)
pull/24837/head
Alexander Smorkalov 1 year ago committed by GitHub
commit 43c1c81c8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      cmake/OpenCVDetectCUDA.cmake

@ -136,11 +136,11 @@ macro(ocv_check_windows_crt_linkage)
cmake_policy(GET CMP0091 MSVC_RUNTIME_SET_BY_ABSTRACTION)
if(MSVC_RUNTIME_SET_BY_ABSTRACTION STREQUAL "NEW")
if(NOT BUILD_SHARED_LIBS AND BUILD_WITH_STATIC_CRT)
set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} " /MT")
set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG} " /MTd")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
else()
set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} " /MD")
set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG} " /MDd")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
endif()
endif()
endif()

Loading…
Cancel
Save