mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
cmake: enforce USE_SSH validity
Validate the USE_SSH option fits into our valid options; don't assume a default.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user