diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f524e6a1..560f82c07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ option(USE_THREADS "Use threads for parallel processing when possibl option(USE_NSEC "Support nanosecond precision file mtimes and ctimes" ON) # Backend selection -option(USE_SSH "Enable SSH support. Can be set to a specific backend" OFF) + set(USE_SSH "" CACHE STRING "Enables SSH support. One of libssh2, exec, or OFF. (Defaults to OFF.)") option(USE_HTTPS "Enable HTTPS support. Can be set to a specific backend" ON) option(USE_SHA1 "Enable SHA1. Can be set to CollisionDetection(ON)/HTTPS" ON) option(USE_SHA256 "Enable SHA256. Can be set to HTTPS/Builtin" ON) diff --git a/cmake/SelectSSH.cmake b/cmake/SelectSSH.cmake index 079857f50..b0d747114 100644 --- a/cmake/SelectSSH.cmake +++ b/cmake/SelectSSH.cmake @@ -39,6 +39,8 @@ elseif(USE_SSH STREQUAL ON OR USE_SSH STREQUAL "libssh2") set(GIT_SSH 1) set(GIT_SSH_LIBSSH2 1) add_feature_info(SSH ON "using libssh2") -else() +elseif(USE_SSH STREQUAL OFF OR USE_SSH STREQUAL "") add_feature_info(SSH OFF "SSH transport support") +else() + message(FATAL_ERROR "unknown SSH option: ${USE_HTTP_PARSER}") endif()