CMAKE_EXPORT_BUILD_DATABASE — CMake 4.3.0 Documentation

# CMAKE_EXPORT_BUILD_DATABASE

Added in version 3.31.

This is a CMake Environment Variable. Its initial value is taken from the calling process environment.

The default value for `CMAKE_EXPORT_BUILD_DATABASE` when there is no explicit configuration given on the first run while creating a new build tree. On later runs in an existing build tree the value persists in the cache as `CMAKE_EXPORT_BUILD_DATABASE`.

Note

This variable is meaningful only when experimental support for build databases has been enabled by the `CMAKE_EXPERIMENTAL_EXPORT_BUILD_DATABASE` gate.