mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
feat(cmakev2/build): add idf_build_generate_depgraph function
The idf_build_generate_depgraph function creates a component dependency graph in dot (graphviz) format for a specified executable. It uses existing helper functions from cmakev1, ensuring that the generated dot files are produced in the same manner as in cmakev1. While adjustments might be needed in the future if necessary, the current implementation is intended to offer the same functionality as cmakev1. Similar to cmakev1, the dot files are only generated only when the __BUILD_COMPONENT_DEPGRAPH_ENABLED build property is set. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
@@ -15,6 +15,8 @@ add_custom_target(flash)
|
||||
|
||||
idf_project_init()
|
||||
|
||||
idf_build_set_property(__BUILD_COMPONENT_DEPGRAPH_ENABLED 1)
|
||||
|
||||
# Test component priority
|
||||
function(test_component_priority)
|
||||
# Set the idf component to be replaced with a testing component of higher
|
||||
@@ -232,6 +234,8 @@ function(test_executable)
|
||||
TARGET menuconfig-fatfs)
|
||||
idf_build_generate_metadata(fatfs_example_bin
|
||||
OUTPUT_FILE project_description_fatfs.json)
|
||||
idf_build_generate_depgraph(fatfs_example
|
||||
OUTPUT_FILE component_deps_fatfs.dot)
|
||||
idf_create_confserver(fatfs_example
|
||||
TARGET confserver-fatfs)
|
||||
|
||||
@@ -255,6 +259,8 @@ function(test_executable)
|
||||
TARGET menuconfig-hello_world)
|
||||
idf_build_generate_metadata(hello_world_example_bin
|
||||
OUTPUT_FILE project_description_hello_world.json)
|
||||
idf_build_generate_depgraph(hello_world_example
|
||||
OUTPUT_FILE component_deps_hello_world.dot)
|
||||
idf_create_confserver(hello_world_example
|
||||
TARGET confserver-hello_world)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user