CMake print cache variables
CMake can print cache variables during the configuration phase using any of these methods.
The “cmake” command itself can print cache variables to the console.
Variable values may be set by passing -D options to the “cmake” command, or by editing them in the CMake GUI or “ccmake” interface.
cmake -Bbuild -LAH-L- Print only the variable names and values, without help messages
-LA- Print all variables, including advanced ones that are not shown by default.
-LAH- Also print help message for each variable.
The CMake GUI is only available if installed and a graphical desktop is available. Press “Configure” to see the cache variables. Values may be edited if desired.
cmake-gui -S . -B buildThe “ccmake” Curses-based interface is available on non-Windows platforms, which can also edit cache variables.
ccmake -B buildFrom the “ccmake” interface, press “c” to configure, “t” to toggle visibility of Advanced variables that are not shown by default.