mirror of
https://github.com/espressif/esp-mqtt.git
synced 2025-09-29 00:21:38 +02:00
change(examples): switch examples to use a minimal build
Currently, several example dependencies rely on the fact that all registered components are added to the build, along with components specified in common requirements. This results in longer build times because even unused components must be built. Switch all examples to use idf_minimal_build to compile only the components actually required by the example. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
committed by
Rocha Euripedes
parent
e71a595cf8
commit
b17444a109
@@ -3,6 +3,8 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
|
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||||
|
idf_build_set_property(MINIMAL_BUILD ON)
|
||||||
project(mqtt_tcp_custom_outbox)
|
project(mqtt_tcp_custom_outbox)
|
||||||
|
|
||||||
# Add custom outbox implementation to mqtt component
|
# Add custom outbox implementation to mqtt component
|
||||||
|
@@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
|
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
|
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||||
|
idf_build_set_property(MINIMAL_BUILD ON)
|
||||||
project(mqtt_ssl)
|
project(mqtt_ssl)
|
||||||
|
|
||||||
target_add_binary_data(mqtt_ssl.elf "main/mqtt_eclipseprojects_io.pem" TEXT)
|
target_add_binary_data(mqtt_ssl.elf "main/mqtt_eclipseprojects_io.pem" TEXT)
|
||||||
|
@@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
|
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
|
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||||
|
idf_build_set_property(MINIMAL_BUILD ON)
|
||||||
project(mqtt_ssl_ds)
|
project(mqtt_ssl_ds)
|
||||||
|
|
||||||
# Flash the custom partition named `esp_secure_cert`.
|
# Flash the custom partition named `esp_secure_cert`.
|
||||||
|
@@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
|
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
|
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||||
|
idf_build_set_property(MINIMAL_BUILD ON)
|
||||||
project(mqtt_ssl_mutual_auth)
|
project(mqtt_ssl_mutual_auth)
|
||||||
|
|
||||||
target_add_binary_data(${CMAKE_PROJECT_NAME}.elf "main/client.crt" TEXT)
|
target_add_binary_data(${CMAKE_PROJECT_NAME}.elf "main/client.crt" TEXT)
|
||||||
|
@@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
|
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
|
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||||
|
idf_build_set_property(MINIMAL_BUILD ON)
|
||||||
project(mqtt_ssl_psk)
|
project(mqtt_ssl_psk)
|
||||||
|
@@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
|
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
|
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||||
|
idf_build_set_property(MINIMAL_BUILD ON)
|
||||||
project(mqtt_tcp)
|
project(mqtt_tcp)
|
||||||
|
@@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
|
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
|
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||||
|
idf_build_set_property(MINIMAL_BUILD ON)
|
||||||
project(mqtt_websocket)
|
project(mqtt_websocket)
|
||||||
|
@@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
|
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
|
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||||
|
idf_build_set_property(MINIMAL_BUILD ON)
|
||||||
project(mqtt_websocket_secure)
|
project(mqtt_websocket_secure)
|
||||||
|
|
||||||
target_add_binary_data(mqtt_websocket_secure.elf "main/mqtt_eclipseprojects_io.pem" TEXT)
|
target_add_binary_data(mqtt_websocket_secure.elf "main/mqtt_eclipseprojects_io.pem" TEXT)
|
||||||
|
@@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
|
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
|
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||||
|
idf_build_set_property(MINIMAL_BUILD ON)
|
||||||
project(mqtt5)
|
project(mqtt5)
|
||||||
|
Reference in New Issue
Block a user