Skip to content

Commit 393fb8a

Browse files
committed
cmake: default NTLM client to off if no HTTPS support
If building libgit2 with `-DUSE_HTTPS=NO`, then CMake will generate an error complaining that there's no usable HTTPS backend for NTLM. In fact, it doesn't make sense to support NTLM when we don't support HTTPS. So let's should just have NTLM default to OFF when HTTPS is disabled to make life easier and to fix our OSSFuzz builds failing.
1 parent 37e4c1b commit 393fb8a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ OPTION(DEPRECATE_HARD "Do not include deprecated functions in the library" OFF
6666
SET(REGEX_BACKEND "" CACHE STRING "Regular expression implementation. One of regcomp_l, pcre2, pcre, regcomp, or builtin.")
6767

6868
IF (UNIX)
69-
OPTION(USE_NTLMCLIENT "Enable NTLM support on Unix." ON )
69+
IF (NOT USE_HTTPS)
70+
OPTION(USE_NTLMCLIENT "Enable NTLM support on Unix." OFF )
71+
ELSE()
72+
OPTION(USE_NTLMCLIENT "Enable NTLM support on Unix." ON )
73+
ENDIF()
7074
ENDIF()
7175

7276
IF (UNIX AND NOT APPLE)

0 commit comments

Comments
 (0)