You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OCV_OPTION(OPENCV_DISABLE_THREAD_SUPPORT "Build the library without multi-threaded code."OFF)
544
548
OCV_OPTION(OPENCV_SEMIHOSTING "Build the library for semihosting target (Arm). See https://developer.arm.com/documentation/100863/latest."OFF)
549
+
OCV_OPTION(ENABLE_CUDA_FIRST_CLASS_LANGUAGE "Enable CUDA as a first class language, if enabled dependant projects will need to use CMake >= 3.18" (WITH_CUDA ANDNOTCMAKE_VERSIONVERSION_LESS 3.18)
message(WARNING "CUDA first class language only supported for CMake versions >= 3.18, falling back to FindCUDA!")
664
+
set(ENABLE_CUDA_FIRST_CLASS_LANGUAGE OFFCACHEBOOL"Enable CUDA as a first class language, if enabled dependant projects will need to use CMake >= 3.18" FORCE)
665
+
else()
666
+
# Forcing windows search location isn't possible, UNIX searches for the compiler using CUDA_PATH, windows uses CUDA_PATH_VXX_X where VXX_X is unknown.
667
+
if(UNIXAND CUDA_PATH ANDNOT$ENV{CUDA_PATH})
668
+
set(ENV{CUDA_PATH} ${CUDA_PATH})
669
+
endif()
670
+
include(CheckLanguage)
671
+
check_language(CUDA)
672
+
if(UNIXANDNOT CMAKE_CUDA_COMPILER)
673
+
message(STATUS"Checking for CUDA compiler in default location (/usr/local/cuda)")
674
+
set(CUDA_PATH "/usr/local/cuda"CACHEINTERNAL"")
675
+
set(ENV{CUDA_PATH} ${CUDA_PATH})
676
+
endif()
677
+
cmake_policy(SET CMP0092 NEW) # CMake 3.15+: leave warning flags out of default CMAKE_<LANG>_FLAGS flags.
0 commit comments