CMAKE-CONFIGURE-LOG(7)
π NAME π
okay so bestie, welcome to the cmake-configure-log(7) manual β aka the CMake Configure Log π
β¨ Added in version 3.26. β¨
πΈ INTRODUCTION πΈ
CMake writes a running log, known as the configure log, of certain events that occur during the Configure step. The configure log does not contain a log of all output, errors, or messages printed while configuring a project. No cap. It is a log of detailed information about specific events, such as toolchain inspection by try_compile(), meant for use in debugging the configuration of a build tree. Itβs giving βreceipts for your configure stepβ π
For human use, this version of CMake writes the configure log to the file:
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeConfigureLog.yaml
However, the location and name of the log file may change in future versions of CMake. Tools that read the configure log should get its location using a configureLog query to the cmake-file-api(7). See the Log Versioning section below for details π«Ά
π§ LOG STRUCTURE π§
The configure log is designed to be both machine- and human-readable. iconic, honestly β
The log file is a YAML document stream containing zero or more YAML documents separated by document markers. Each document begins with a --- document marker line, contains a single YAML mapping that logs events from one CMake βconfigureβ step, and, if the configure step finished normally, ends with a ... document marker line:
---
events:
-
kind: "try_compile-v1"
# (other fields omitted)
-
kind: "try_compile-v1"
# (other fields omitted)
...
A new document is appended to the log every time CMake configures the build tree and logs new events. lowkey a diary for your build tree π
The keys of each document root mapping are:
eventsβ a YAML block sequence of nodes corresponding to events logged during one CMake βconfigureβ step. Each event is a YAML node containing one of the Event Kinds documented below. periodt. π
π¦ Log Versioning π¦
Each of the Event Kinds is versioned independently. The set of keys an eventβs log entry provides is specific to its major version. When an event is logged, the latest version of its event kind that is known to the running version of CMake is always written to the log. no mix-ups, bestie π
Tools reading the configure log must ignore event kinds and versions they do not understand:
- A future version of CMake may introduce a new event kind or version.
- If an existing build tree is re-configured with a different version of CMake, the log may contain different versions of the same event kind.
- If
cmake-file-api(7)queries request one or moreconfigureLogobject versions, the log may contain multiple entries for the same event, each with a different version of its event kind.
IDEs should write a cmake-file-api(7) query requesting a specific configureLog object version, before running CMake, and then read the configure log only as described by the file-api reply. iykyk π«Ά
π Text Block Encoding π
In order to make the log human-readable, text blocks are always represented using YAML literal block scalars (|). Since literal block scalars do not support escaping, backslashes and non-printable characters are encoded at the application layer:
\\encodes a backslash.\xXXencodes a byte using two hexadecimal digits,XX.
π EVENT KINDS π
Every event kind is represented by a YAML mapping of the form:
kind: "<kind>-v<major>"
backtrace:
- "<file>:<line> (<function>)"
checks:
- "Checking for something"
#...event-specific keys...
The keys common to all events are:
kindβ a string identifying the event kind and major version.backtraceβ a YAML block sequence reporting the call stack of CMake source locations at which the event occurred, from most-recent to least-recent. Each node is a string specifying one location formatted as<file>:<line> (<function>).checksβ an optional key that is present when the event occurred with at least one pendingmessage(CHECK_START). Its value is a YAML block sequence reporting the stack of pending checks, from most-recent to least-recent. Each node is a string containing a pending check message.
Additional mapping keys are specific to each (versioned) event kind, described below. stay with me bestie, weβre going kind by kind π
β¨ Event Kind message β¨
The message(CONFIGURE_LOG) command logs message events.
There is only one message event major version, version 1.
π message-v1 Event π
A message-v1 event is a YAML mapping:
kind: "message-v1"
backtrace:
- "CMakeLists.txt:123 (message)"
checks:
- "Checking for something"
message: |
# ...
The keys specific to message-v1 mappings are:
messageβ a YAML literal block scalar containing the message text, represented using our Text Block Encoding.
β¨ Event Kind try_compile β¨
The try_compile() command logs try_compile events.
There is only one try_compile event major version, version 1.
π try_compile-v1 Event π
A try_compile-v1 event is a YAML mapping:
kind: "try_compile-v1"
backtrace:
- "CMakeLists.txt:123 (try_compile)"
checks:
- "Checking for something"
description: "Explicit LOG_DESCRIPTION"
directories:
source: "/path/to/.../TryCompile-01234"
binary: "/path/to/.../TryCompile-01234"
cmakeVariables:
SOME_VARIABLE: "Some Value"
buildResult:
variable: "COMPILE_RESULT"
cached: true
stdout: |
# ...
exitCode: 0
The keys specific to try_compile-v1 mappings are:
descriptionβ an optional key that is present when theLOG_DESCRIPTION<text> option was used. Its value is a string containing the description <text>.directoriesβ a mapping describing the directories associated with the compilation attempt. It has the following keys:sourceβ string specifying the source directory of thetry_compile()project.binaryβ string specifying the binary directory of thetry_compile()project. For non-project invocations, this is often the same as the source directory.
cmakeVariablesβ an optional key that is present when CMake propagates variables into the test project, either automatically or due to theCMAKE_TRY_COMPILE_PLATFORM_VARIABLESvariable. Its value is a mapping from variable names to their values.buildResultβ a mapping describing the result of compiling the test code. It has the following keys:variableβ a string specifying the name of the CMake variable storing the result of trying to build the test project.cachedβ a boolean indicating whether the above result variable is stored in the CMake cache.stdoutβ a YAML literal block scalar containing the output from building the test project, represented using our Text Block Encoding. This contains build output from both stdout and stderr.exitCodeβ an integer specifying the build tool exit code from trying to build the test project.
β¨ Event Kind try_run β¨
The try_run() command logs try_run events.
There is only one try_run event major version, version 1.
π try_run-v1 Event π
A try_run-v1 event is a YAML mapping:
kind: "try_run-v1"
backtrace:
- "CMakeLists.txt:456 (try_run)"
checks:
- "Checking for something"
description: "Explicit LOG_DESCRIPTION"
directories:
source: "/path/to/.../TryCompile-56789"
binary: "/path/to/.../TryCompile-56789"
buildResult:
variable: "COMPILE_RESULT"
cached: true
stdout: |
# ...
exitCode: 0
runResult:
variable: "RUN_RESULT"
cached: true
stdout: |
# ...
stderr: |
# ...
exitCode: 0
The keys specific to try_run-v1 mappings include those documented by the try_compile-v1 event, plus:
runResultβ a mapping describing the result of running the test code. It has the following keys:variableβ a string specifying the name of the CMake variable storing the result of trying to run the test executable.cachedβ a boolean indicating whether the above result variable is stored in the CMake cache.stdoutβ an optional key that is present when the test project built successfully. Its value is a YAML literal block scalar containing output from running the test executable, represented using our Text Block Encoding.
If RUN_OUTPUT_VARIABLE was used, stdout and stderr are captured together, so this will contain both. Otherwise, this will contain only the stdout output.
stderrβ an optional key that is present when the test project built successfully and theRUN_OUTPUT_VARIABLEoption was not used. Its value is a YAML literal block scalar containing output from running the test executable, represented using our Text Block Encoding.
If RUN_OUTPUT_VARIABLE was used, stdout and stderr are captured together in the stdout key, and this key will not be present. Otherwise, this will contain the stderr output.
exitCodeβ an optional key that is present when the test project built successfully. Its value is an integer specifying the exit code, or a string containing an error message, from trying to run the test executable.
β¨ Event Kind find β¨
The find_file(), find_path(), find_library(), and find_program() commands log find events.
There is only one find event major version, version 1.
π find-v1 Event π
Added in version 4.1.
A find-v1 event is a YAML mapping:
kind: "find-v1"
backtrace:
- "CMakeLists.txt:456 (find_program)"
mode: "program"
variable: "PROGRAM_PATH"
description: "Docstring for variable"
settings:
SearchFramework: "NEVER"
SearchAppBundle: "NEVER"
CMAKE_FIND_USE_CMAKE_PATH: true
CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: true
CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: true
CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: true
CMAKE_FIND_USE_INSTALL_PREFIX: true
names:
- "name1"
- "name2"
candidate_directories:
- "/path/to/search"
- "/other/path/to/search"
- "/path/to/found"
- "/further/path/to/search"
searched_directories:
- "/path/to/search"
- "/other/path/to/search"
found: "/path/to/found/program"
okay so the keys that are specifically a find-v1 thing (like, the ones that only show up here) are these bestie:
modeβ a string that tells you which search the command actually ran. It's one offile,path,program, orlibrary. pick your fighter πvariableβ the variable where the search dumped its result.descriptionβ the docstring of that variable. cute little lore drop πsettingsβ the search settings that were live for this search. and inside it:SearchFrameworkβ a string saying how framework search goes down. one ofFIRST,LAST,ONLY, orNEVER. seeCMAKE_FIND_FRAMEWORK. πSearchAppBundleβ a string saying how application-bundle search goes down. one ofFIRST,LAST,ONLY, orNEVER. seeCMAKE_FIND_APPBUNDLE. πCMAKE_FIND_USE_CMAKE_PATHβ a boolean, is it using CMake-specific cache variables while searching or not. seeCMAKE_FIND_USE_CMAKE_PATH.CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATHβ a boolean, is it using CMake-specific environment variables while searching or not. seeCMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH.CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATHβ a boolean, is it using platform-specific environment variables while searching or not. seeCMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH.CMAKE_FIND_USE_CMAKE_SYSTEM_PATHβ a boolean, is it using platform-specific CMake variables while searching or not. seeCMAKE_FIND_USE_CMAKE_SYSTEM_PATH.CMAKE_FIND_USE_INSTALL_PREFIXβ a boolean, is it using the install prefix while searching or not. seeCMAKE_FIND_USE_INSTALL_PREFIX.
namesβ the names it was looking for. the whole point of the quest tbh πcandidate_directoriesβ candidate directories, in order, that it looked in during the search.searched_directoriesβ directories, in order, that were actually looked at during the search process.foundβ either a string with the found value, orfalseif it simply was not found. it's giving "got it or didn't" energy πsearch_contextβ a mapping of variable names to the search paths those variables specified. it's either a string or an array of strings depending on the variable, no cap. environment variables get wrapped withENV{and}, otherwise it's CMake variables being used. and only variables that actually have some paths specified are included, so no empty boring entries. β¨package_stackβ an array of objects with paths that come from the stack of paths made available byfind_package()calls.package_pathsβ the paths made available byfind_package()commands in the call stack.
πΈ Event Kind find_package πΈ
Added in version 4.1. π
The find_package() command logs find_package events. literally its whole job.
There is only one find_package event major version, version 1. one and done, periodt.
π¦ find_package-v1 Event π¦
A find_package-v1 event is a YAML mapping:
kind: "find_package-v1"
backtrace:
- "CMakeLists.txt:456 (find_program)"
name: "PackageName"
components:
-
name: "Component"
required: true
found: true
configs:
-
filename: PackageNameConfig.cmake
kind: "cmake"
-
filename: packagename-config.cmake
kind: "cmake"
version_request:
version: "1.0"
version_complete: "1.0...1.5"
min: "INCLUDE"
max: "INCLUDE"
exact: false
settings:
required: "optional"
quiet: false
global: false
policy_scope: true
bypass_provider: false
hints:
- "/hint/path"
names:
- "name1"
- "name2"
search_paths:
- "/search/path"
path_suffixes:
- ""
- "suffix"
registry_view: "HOST"
paths:
CMAKE_FIND_USE_CMAKE_PATH: true
CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: true
CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: true
CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: true
CMAKE_FIND_USE_INSTALL_PREFIX: true
CMAKE_FIND_USE_PACKAGE_ROOT_PATH: true
CMAKE_FIND_USE_CMAKE_PACKAGE_REGISTRY: true
CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY: true
CMAKE_FIND_ROOT_PATH_MODE: "BOTH"
candidates:
-
path: "/path/to/config/PackageName/PackageNameConfig.cmake"
mode: "config"
reason: "insufficient_version"
-
path: "/path/to/config/PackageName/packagename-config.cmake"
mode: "config"
reason: "no_exist"
found:
path: "/path/to/config/PackageName-2.5/PackageNameConfig.cmake"
mode: "config"
version: "2.5"
The keys specific to find_package-v1 mappings are:
nameβ the name of the requested package. the main character of this whole event fr πcomponentsβ if present, an array of objects with these fields:nameβ the name of the component.requiredβ a boolean, is this component required or optional.foundβ a boolean, was this component found or not.
configsβ if present, an array of objects telling you which configuration files it searches for.filenameβ the filename of the configuration file.kindβ the kind of file. eithercmakeorcps.
version_requestβ an object showing the version constraints on the search.versionβ the minimum version required.version_completeβ the version range that the user handed over.minβ whether toINCLUDEorEXCLUDEthe lower bound of the version range.maxβ whether toINCLUDEorEXCLUDEthe upper bound of the version range.exactβ a boolean, was anEXACTversion match requested. no wiggle room bestie π―
settingsβ the search settings that were active for the search.requiredβ the requirement request of the search. one ofoptional,optional_explicit,required_explicit,required_from_package_variable, orrequired_from_find_variable. so many flavours πquietβ a boolean, is the searchQUIETor not.globalβ a boolean, was theGLOBALkeyword provided or not.policy_scopeβ a boolean, was theNO_POLICY_SCOPEkeyword provided or not.bypass_providerβ a boolean, was theBYPASS_PROVIDERkeyword provided or not.hintsβ an array of paths that were provided asHINTS.namesβ an array of package names to use when searching, provided byNAMES.search_pathsβ an array of paths to search, provided byPATHS.path_suffixesβ an array of suffixes to use when searching, provided byPATH_SUFFIXES.registry_viewβ theREGISTRY_VIEWthat was requested for the search.pathsβ the path settings that were active for the search:CMAKE_FIND_USE_CMAKE_PATHβ a boolean, is it using CMake-specific cache variables while searching or not. seeCMAKE_FIND_USE_CMAKE_PATH.CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATHβ a boolean, is it using CMake-specific environment variables while searching or not. seeCMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH.CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATHβ a boolean, is it using platform-specific environment variables while searching or not. seeCMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH.CMAKE_FIND_USE_CMAKE_SYSTEM_PATHβ a boolean, is it using platform-specific CMake variables while searching or not. seeCMAKE_FIND_USE_CMAKE_SYSTEM_PATH.CMAKE_FIND_USE_INSTALL_PREFIXβ a boolean, is it using the install prefix while searching or not. seeCMAKE_FIND_USE_INSTALL_PREFIX.CMAKE_FIND_USE_CMAKE_PACKAGE_REGISTRYβ a boolean, should it search the CMake package registry for the package or not. seeCMAKE_FIND_USE_PACKAGE_REGISTRY.
CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY
okay so this one is a boolean telling you whether or not to search the system CMake package registry for the package. See CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY <# variable:CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY>.
CMAKE_FIND_ROOT_PATH_MODE
This is a string serving the root path mode currently in effect, as selected by the CMAKE_FIND_ROOT_PATH_BOTH, ONLY_CMAKE_FIND_ROOT_PATH, and NO_CMAKE_FIND_ROOT_PATH arguments. slay β¨
candidates
An array of rejected candidate paths. bestie, each element contains these keys:
pathβ the path to the considered file. In the case of a dependency provider, the value is in the form ofdependency_provider::<COMMAND_NAME>.modeβ the mode which found the file. One ofmodule,cps,cmake, orprovider.reasonβ the reason the path was rejected. One ofinsufficient_version,no_exist,ignored,no_config_file, ornot_found.messageβ if present, a string describing why the package is considered as not found.
found
If the package has been found, this is information on the found file. If it is not found, this is null. keys available:
pathβ the path to the module or configuration that found the package. In the case of a dependency provider, the value is in the form ofdependency_provider::<COMMAND_NAME>.modeβ the mode that considered the path. One ofmodule,cps,cmake, orprovider.versionβ the reported version of the package.
search_context
A mapping of variable names to search paths specified by them (either a string or an array of strings depending on the variable). Environment variables are wrapped with ENV{ and }, otherwise CMake variables are used. Only variables with any paths specified are used. iykyk π¦
package_stackβ an array of objects with paths which come from the stack of paths made available byfind_package() <# command:find_package>calls.package_pathsβ the paths made available byfind_package() <# command:find_package>commands in the call stack.
Copyright
2000-2026 Kitware, Inc. and Contributors
and that's the whole vibe for this page β source footer energy is version 4.4.5, dated Oct 28, 2026. bye bestie, periodt π
β¨π«Ά
π¦ where this page comes from
- arch rolling: cmake 4.4.5-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms