mirror of
https://github.com/curl/curl.git
synced 2026-08-01 10:48:08 +03:00
cmake: add debug function to dump all variables
Place a `curl_dumpvars()` call anywhere in the CMake code to use it. Closes #14439
This commit is contained in:
parent
e20413980c
commit
cd51bb503a
1 changed files with 7 additions and 0 deletions
|
|
@ -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})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue