From: Viktor Szakats Date: Wed, 7 Aug 2024 12:46:17 +0000 (+0200) Subject: cmake: add debug function to dump all variables X-Git-Tag: curl-8_10_0~339 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd51bb503ae1779a45c90898b89da6e19c616521;p=thirdparty%2Fcurl.git cmake: add debug function to dump all variables Place a `curl_dumpvars()` call anywhere in the CMake code to use it. Closes #14439 --- 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})