Displaying CMake variables - Stack Overflow
stackoverflow.com › questions › 31343813Jul 10, 2015 · Here is that code encapsulated into a cmake macro, print_all_variables, so I can use it when debugging my cmake scripts. macro(print_all_variables) message(STATUS "print_all_variables-----{") get_cmake_property(_variableNames VARIABLES) foreach (_variableName ${_variableNames}) message(STATUS "${_variableName}=${${_variableName}}") endforeach() message(STATUS "print_all_variables-----}") endmacro()