From cd51bb503ae1779a45c90898b89da6e19c616521 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 7 Aug 2024 14:46:17 +0200 Subject: [PATCH] cmake: add debug function to dump all variables Place a `curl_dumpvars()` call anywhere in the CMake code to use it. Closes #14439 --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7427516898..03038a9eeb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,6 +82,13 @@ endif() message(STATUS "CMake platform flags:${_flags}") set(_flags) +function(curl_dumpvars) # Dump all defined variables with their values + get_cmake_property(_vars VARIABLES) + foreach(_var ${_vars}) + message("${_var} = ${${_var}}") + endforeach() +endfunction() + file(STRINGS ${CURL_SOURCE_DIR}/include/curl/curlver.h _curl_version_h_contents REGEX "#define LIBCURL_VERSION( |_NUM )") string(REGEX MATCH "#define LIBCURL_VERSION \"[^\"]*" CURL_VERSION ${_curl_version_h_contents})