From 29e766292a599162240340fd86ada447c6f08040 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 31 Jul 2025 16:38:34 +0200 Subject: [PATCH] drop redundant HAVE_MANUAL_TOOLS interim variable --- CMakeLists.txt | 11 +++-------- src/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a63b04d82..7e3cfff3ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -532,13 +532,8 @@ option(BUILD_LIBCURL_DOCS "Build libcurl man pages" ON) option(BUILD_MISC_DOCS "Build misc man pages (e.g. curl-config and mk-ca-bundle)" ON) option(ENABLE_CURL_MANUAL "Build the man page for curl and enable its -M/--manual option" ON) -if(ENABLE_CURL_MANUAL OR BUILD_LIBCURL_DOCS) - if(PERL_FOUND) - set(HAVE_MANUAL_TOOLS ON) - endif() - if(NOT HAVE_MANUAL_TOOLS) - message(WARNING "Perl not found. Will not build manuals.") - endif() +if((ENABLE_CURL_MANUAL OR BUILD_LIBCURL_DOCS) AND NOT PERL_FOUND) + message(WARNING "Perl not found. Will not build manuals.") endif() # If we are on AIX, do the _ALL_SOURCE magic @@ -2034,7 +2029,7 @@ else() set(CURL_BUILD_TESTING OFF) endif() -if(HAVE_MANUAL_TOOLS) +if(PERL_FOUND) set(CURL_MANPAGE "${PROJECT_BINARY_DIR}/docs/cmdline-opts/curl.1") set(CURL_ASCIIPAGE "${PROJECT_BINARY_DIR}/docs/cmdline-opts/curl.txt") add_subdirectory(docs) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 51b2b76b87..6aeecba2a8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,7 +28,7 @@ set(_curl_cfiles_gen "") set(_curl_hfiles_gen "") set(_curl_definitions "") -if(ENABLE_CURL_MANUAL AND HAVE_MANUAL_TOOLS) +if(ENABLE_CURL_MANUAL AND PERL_FOUND) list(APPEND _curl_definitions "USE_MANUAL") add_custom_command(OUTPUT "tool_hugehelp.c" COMMAND ${CMAKE_COMMAND} -E echo "#include \"tool_setup.h\"" > "tool_hugehelp.c"