mirror of https://github.com/AlexeyAB/darknet.git
add compatibility with CMake 3.17
This commit is contained in:
parent
91e6b8631b
commit
6a2e9ca1c6
|
@ -78,6 +78,13 @@ if(CMAKE_CUDA_COMPILER AND ENABLE_CUDA)
|
|||
message(STATUS "Your setup supports half precision (it requires CC >= 7.0)")
|
||||
endif()
|
||||
endif()
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.17")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_CUDA_RUNTIME_LIBRARY "Shared")
|
||||
else()
|
||||
set(CMAKE_CUDA_RUNTIME_LIBRARY "Static")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set(ENABLE_CUDA "FALSE" CACHE BOOL "Enable CUDA support" FORCE)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue