Debug

Operations for helping with debug. It requires CMake 3.20 or newer.

Synopsis

debug(DUMP_VARIABLES [EXCLUDE_REGEX <regular_expression>])
debug(DUMP_PROPERTIES)
debug(DUMP_TARGET_PROPERTIES <target_name>)
debug(DUMP_PROJECT_VARIABLES)

Usage

debug(DUMP_VARIABLES [EXCLUDE_REGEX <regular_expression>])

Disaply all CMake variables except those that match with the optional <regular_expression> parameter.

debug(DUMP_PROPERTIES)

Disaply all CMake properties.

debug(DUMP_TARGET_PROPERTIES <target_name>)

Display all CMake properties of target <target_name> parameter.

debug(DUMP_PROJECT_VARIABLES)

Display all global variables of the project. The trick is to exploit the naming convention which stipulates that each variable is prefixed by ${PROJECT_NAME}.