set(ENABLE_CUDA"FALSE"CACHEBOOL"Enable CUDA support"FORCE)
message(WARNING"To build with CUDA support you need CMake 3.9.0+")
set(ENABLE_CUDA"FALSE"CACHEBOOL"Enable CUDA support"FORCE)
else()
include(CheckLanguage)
check_language(CUDA)
if(CMAKE_CUDA_COMPILER)
if(CMAKE_CUDA_COMPILERANDENABLE_CUDA)
set(CUDA_ARCHITECTURES"Auto"CACHESTRING"\"Auto\" detects local machine GPU compute arch at runtime, \"Common\" and \"All\" cover common and entire subsets of architectures, \"Names\" is a list of architectures to enable by name, \"Numbers\" is a list of compute capabilities (version number) to enable")
- if [%COMPILER%]==[cygwin] %CYGSH% 'cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release"'
- if [%COMPILER%]==[vs] if NOT [%USE_INTEGRATED_LIBS%]==[yes] if [%configuration%]==[Release] cmake -G "Visual Studio 15 2017" -T "host=x64" -A "x64" "-DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=%VCPKG_DEFAULT_TRIPLET%" -DCMAKE_BUILD_TYPE="Release" ..
- if [%COMPILER%]==[vs] if [%USE_INTEGRATED_LIBS%]==[yes] cmake -G "Visual Studio 15 2017" -T "host=x64" -A "x64" -DCMAKE_BUILD_TYPE="Release" ..
- if [%COMPILER%]==[vs] if [%USE_INTEGRATED_LIBS%]==[yes] if [%FORCE_CPP%]==[yes] cmake -G "Visual Studio 15 2017" -T "host=x64" -A "x64" -DCMAKE_BUILD_TYPE="Release" "-DBUILD_AS_CPP:BOOL=TRUE" ..
- if [%COMPILER%]==[vs] if [%USE_INTEGRATED_LIBS%]==[yes] cmake -G "Visual Studio 15 2017" -T "host=x64" -A "x64" -DCMAKE_BUILD_TYPE="Release" ..
#cmake --build . --config Release --parallel ${number_of_build_workers} --target install #valid only for CMake 3.12+
Remove-ItemDarknetConfig.cmake
Remove-ItemDarknetConfigVersion.cmake
Copy-ItemRelease\*.dll..
$dllfiles=Get-ChildItem${dllfolder}\*.dll
if($dllfiles){
Copy-Item$dllfiles..
}
Set-Location..
Copy-Itemcmake\Modules\*.cmakeshare\darknet\
}
@ -174,12 +204,21 @@ else {
# if you want to manually force this case, remove VCPKG_ROOT env variable and remember to use "vcpkg integrate remove" in case you had enabled user-wide vcpkg integration