|
|
|
@ -38,13 +38,13 @@ set(INSTALL_INCLUDE_DIR "include/darknet" CACHE PATH "Path where head |
|
|
|
|
set(INSTALL_CMAKE_DIR "share/darknet" CACHE PATH "Path where cmake configs will be installed") |
|
|
|
|
|
|
|
|
|
set(ENABLE_OPENCV "TRUE" CACHE BOOL "Enable OpenCV integration") |
|
|
|
|
set(ENABLE_CUDA "FALSE" CACHE BOOL "Enable CUDA support") |
|
|
|
|
set(ENABLE_CUDA "TRUE" CACHE BOOL "Enable CUDA support") |
|
|
|
|
set(ENABLE_CUDNN "FALSE" CACHE BOOL "Enable CUDNN") |
|
|
|
|
set(ENABLE_CUDNN_HALF "FALSE" CACHE BOOL "Enable CUDNN Half precision") |
|
|
|
|
|
|
|
|
|
if(${CMAKE_VERSION} VERSION_LESS "3.9.0") |
|
|
|
|
set(ENABLE_CUDA "FALSE" CACHE BOOL "Enable CUDA support" FORCE) |
|
|
|
|
message(WARNING "To build with CUDA support you need CMake 3.9.0+") |
|
|
|
|
set(ENABLE_CUDA "FALSE" CACHE BOOL "Enable CUDA support" FORCE) |
|
|
|
|
else() |
|
|
|
|
include(CheckLanguage) |
|
|
|
|
check_language(CUDA) |
|
|
|
@ -55,8 +55,8 @@ else() |
|
|
|
|
find_package(CUDA REQUIRED) |
|
|
|
|
if(CUDA_VERSION VERSION_LESS "9.0") |
|
|
|
|
message(STATUS "Unsupported CUDA version, please upgrade to CUDA 9+. Disabling CUDA support") |
|
|
|
|
set(ENABLE_CUDA "FALSE" CACHE BOOL "Enable CUDA support" FORCE) |
|
|
|
|
else() |
|
|
|
|
set(ENABLE_CUDA "TRUE" CACHE BOOL "Enable CUDA support" FORCE) |
|
|
|
|
cuda_select_nvcc_arch_flags(CUDA_ARCH_FLAGS ${CUDA_ARCHITECTURES}) |
|
|
|
|
message(STATUS "Building with CUDA flags: " "${CUDA_ARCH_FLAGS}") |
|
|
|
|
if ("arch=compute_75,code=sm_75" IN_LIST CUDA_ARCH_FLAGS) |
|
|
|
@ -64,6 +64,9 @@ else() |
|
|
|
|
message(STATUS "Your setup supports half precision!") |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
else() |
|
|
|
|
message(STATUS "Unable to find a CUDA compiler. Disabling CUDA support") |
|
|
|
|
set(ENABLE_CUDA "FALSE" CACHE BOOL "Enable CUDA support" FORCE) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|