Listing all variables in CMake build

To list all CMake variables in a build job, enter the following:

get_cmake_property(_variableNames VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
    message(STATUS "${_variableName}=${${_variableName}}")
endforeach()

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *