From 551861110db67c7bad2bd0715f46191454c0b9a7 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 30 Jun 2017 17:50:23 +0200 Subject: CMake: Do not allow FORCE_CURL=ON with WITH_CURL=OFF This makes no sense. We need both entries in the cache, as we check FORCE_CURL in the test suite. Gbp-Dch: ignore --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8bc52036b..30f3e6073 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,8 +78,11 @@ endif() # apt-transport-https dependencies option(WITH_CURL "Build curl-based methods" ON) +option(FORCE_CURL "Use curl-based methods" OFF) +if (FORCE_CURL AND NOT WITH_CURL) + message(FATAL_ERROR "Cannot set FORCE_CURL=ON with WITH_CURL=OFF") +endif() if (WITH_CURL) - option(FORCE_CURL "Use curl-based methods" OFF) find_package(CURL REQUIRED) if (CURL_FOUND) set(HAVE_CURL 1) -- cgit v1.2.3