mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-28 19:34:59 +00:00
78ae7ab085
This commit adds a new idf.py --preset NAME argument, which allows selecting the CMake configuration preset with a given name. For idf.py, selecting the preset does two things: - sets the build directory, which is specified in the preset itself using "binaryDir" field - passes --preset argument to CMake configuration phase The multi_config example is updated to illustrate how this feature is expected to be used.
35 lines
1.1 KiB
JSON
35 lines
1.1 KiB
JSON
{
|
|
"version": 3,
|
|
"configurePresets": [
|
|
{
|
|
"name": "default",
|
|
"binaryDir": "build/default",
|
|
"displayName": "Default (development)",
|
|
"description": "Development configuration",
|
|
"cacheVariables": {
|
|
"SDKCONFIG": "./build/default/sdkconfig"
|
|
}
|
|
},
|
|
{
|
|
"name": "prod1",
|
|
"binaryDir": "build/prod1",
|
|
"displayName": "Product 1",
|
|
"description": "Production configuration for product 1",
|
|
"cacheVariables": {
|
|
"SDKCONFIG_DEFAULTS": "sdkconfig.defaults.prod_common;sdkconfig.defaults.prod1",
|
|
"SDKCONFIG": "./build/prod1/sdkconfig"
|
|
}
|
|
},
|
|
{
|
|
"name": "prod2",
|
|
"binaryDir": "build/prod2",
|
|
"displayName": "Product 2",
|
|
"description": "Production configuration for product 2",
|
|
"cacheVariables": {
|
|
"SDKCONFIG_DEFAULTS": "sdkconfig.defaults.prod_common;sdkconfig.defaults.prod2",
|
|
"SDKCONFIG": "./build/prod2/sdkconfig"
|
|
}
|
|
}
|
|
]
|
|
}
|