Skip to content

Instantly share code, notes, and snippets.

@alifarazz
Last active May 20, 2024 19:53
Show Gist options
  • Save alifarazz/f7379be0e9365511d0d5bd78e9d26fd8 to your computer and use it in GitHub Desktop.
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