summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2017-06-30 17:50:23 +0200
committerJulian Andres Klode <jak@debian.org>2017-06-30 18:16:42 +0200
commit551861110db67c7bad2bd0715f46191454c0b9a7 (patch)
tree15c9482e1b5ae761df5952ef165f2632d47cfc73
parent6a0e7acbf01e22665d89a9c6556f3a8220a78756 (diff)
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
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
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)