From 94fc83b6d7f179190142b91abd0d22240aced0c1 Mon Sep 17 00:00:00 2001 From: Etienne Samson Date: Thu, 13 Jun 2019 16:48:35 +0200 Subject: cmake: Modulize our TLS & hash detection The interactions between `USE_HTTPS` and `SHA1_BACKEND` have been streamlined. Previously we would have accepted not quite working configurations (like, `-DUSE_HTTPS=OFF -DSHA1_BACKEND=OpenSSL`) and, as the OpenSSL detection only ran with `USE_HTTPS`, the link would fail. The detection was moved to a new `USE_SHA1`, modeled after `USE_HTTPS`, which takes the values "CollisionDetection/Backend/Generic", to better match how the "hashing backend" is selected, the default (ON) being "CollisionDetection". Note that, as `SHA1_BACKEND` is still used internally, you might need to check what customization you're using it for. --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b7f2bc746..127449ce3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,11 +52,9 @@ OPTION(TAGS "Generate tags" OFF) OPTION(PROFILE "Generate profiling information" OFF) OPTION(ENABLE_TRACE "Enables tracing support" OFF) OPTION(LIBGIT2_FILENAME "Name of the produced binary" OFF) - - SET(SHA1_BACKEND "CollisionDetection" CACHE STRING - "Backend to use for SHA1. One of Generic, OpenSSL, Win32, CommonCrypto, mbedTLS, CollisionDetection.") OPTION(USE_SSH "Link with libssh2 to enable SSH support" ON) 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/Generic" ON) OPTION(USE_GSSAPI "Link with libgssapi for SPNEGO auth" OFF) OPTION(USE_STANDALONE_FUZZERS "Enable standalone fuzzers (compatible with gcc)" OFF) OPTION(VALGRIND "Configure build for valgrind" OFF) -- cgit v1.2.1