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 ==========================")