# Build System v2

注意

Build System v2 is currently available as a Technical Preview intended for testing and evaluation. Features, functionality, and performance are subject to change without notice, and production use is not recommended at this stage.

## Introduction

The ESP-IDF CMake-based build system v2, referred to throughout this documentation simply as v2, is the next generation of the ESP-IDF build system. It is the successor to the CMake-based build system v1, referred to as v1, which has been the default ESP-IDF build system since ESP-IDF v4.0, when CMake superseded the earlier GNU Make based build system. Like v1, v2 builds and links an ESP-IDF project from reusable units called components, while resolving several structural limitations of the original CMake-based design.

The most significant changes introduced by v2 are:

- Configuration-driven component dependencies. Component dependencies can be expressed in terms of Kconfig configuration options, so the set of components built into a project can follow its configuration. See Configuring Component Dependencies.

- Single-pass component evaluation. v2 removes the early component evaluation that v1 performed in CMake script mode. Each component is evaluated once, as ordinary CMake code, which makes the build easier to reason about. The model is described in Design and Architecture.

- Native CMake components. A component can be written as a plain CMake static library, without the `idf_component_register` wrapper, giving full access to native CMake functionality. See Native CMake Component.

v2 is designed to stay as backward compatible with v1 as possible. Most projects and components written for v1 build under v2 without modification. Where a design difference does require a change to a v1 component, it is documented in Breaking Changes. To convert an existing project to v2, see Updating an Existing Project.

Runnable applications that accompany the guides below are provided in the Build System v2 examples . Terminology used throughout this guide is collected in the Glossary.

## Guides

- Creating a New Project
- Updating an Existing Project
- Creating a New Component
- Updating an Existing Component
- Managing Component Backward Compatibility
- Configuring Component Dependencies
- Integrating Third-Party Libraries
- Using ESP-IDF as a Library
- Building Multiple Binaries
- Building Multiple Configurations
- Using Build Event Callbacks

## Reference

- Design and Architecture
- Breaking Changes
- API Reference
- Glossary
- Build System v1

此文档对您有帮助吗？

- 反馈已收到，谢谢！
- 如果您有其他意见，欢迎填写乐鑫文档反馈表。

- 我们重视您的反馈。
- 您可以填写乐鑫文档反馈表告诉我们如何改进该文档。