FindGDB¶
Find the GNU Debugger.
Hints¶
This module reads hints about search locations from variables:
GDB_ROOTPreferred installation prefix.
Users may set these hints as normal CMake variables, cache entries or environment variables.
Imported Targets¶
This module provides the following imported targets, if found:
GDB::GDBThe GNU Debugger executable.
Result Variables¶
This will define the following variables:
GDB_FOUNDTrue if the system has GDB installed.
GDB_VERSIONThe version of GDB which was found (eg. 2.5).
GDB_VERSION_MAJORGDB major version found (eg. 2).
GDB_VERSION_MINORGDB minor version found (eg. 5).
Cache Variables¶
The following cache variables may also be set:
GDB_EXECUTABLEThe full path to the GDB executable.
Components¶
The module accepts architecture support query using COMPONENTS. For example, support for armv7e-m and i386 architectures can be check as follow:
find_package(GDB COMPONENTS armv7e-m i386)
if(GDB_FOUND)
message("GDB found: ${GDB_EXECUTABLE}")
endif()