Skip to content

Instantly share code, notes, and snippets.

@alifarazz
Last active November 5, 2025 16:43
Show Gist options
  • Select an option

  • Save alifarazz/f7379be0e9365511d0d5bd78e9d26fd8 to your computer and use it in GitHub Desktop.

Select an option

Save alifarazz/f7379be0e9365511d0d5bd78e9d26fd8 to your computer and use it in GitHub Desktop.
CMake variable dump

CMake All Variable Dump

Put this wherever you'd want to dump the variables from.

message("=============BEGIN VARIABLE DUMP ========================")
get_cmake_property(_variableNames VARIABLES)
foreach (_variableName ${_variableNames})
    message("${_variableName}=${${_variableName}}")
endforeach()
message("=============END VARIABLE DUMP ==========================")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment