Skip to content

Commit 548f6c2

Browse files
nordicjmfabiobaltieri
authored andcommitted
cmake: reports: Fix report targets
Fixes report targets where tfm_* and bl2_* targets wrongly generates a footprint file by having a common target which consists of RAM and ROM report targets Signed-off-by: Jamie McCrae <[email protected]>
1 parent 565a489 commit 548f6c2

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

cmake/reports/CMakeLists.txt

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ elseif(DEFINED WEST_TOPDIR)
1111
set(workspace_arg "--workspace=${WEST_TOPDIR}")
1212
endif()
1313

14-
foreach(report ram_report rom_report footprint)
14+
foreach(report ram_report rom_report)
1515
add_custom_target(
1616
${report}
1717
${PYTHON_EXECUTABLE}
@@ -29,8 +29,13 @@ foreach(report ram_report rom_report footprint)
2929
)
3030
endforeach()
3131

32+
add_custom_target(
33+
footprint
34+
DEPENDS ram_report rom_report
35+
)
36+
3237
if(CONFIG_BUILD_WITH_TFM)
33-
foreach(report ram_report rom_report footprint)
38+
foreach(report ram_report rom_report)
3439
add_custom_target(
3540
tfm_${report}
3641
${PYTHON_EXECUTABLE}
@@ -47,10 +52,15 @@ if(CONFIG_BUILD_WITH_TFM)
4752
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
4853
)
4954
endforeach()
55+
56+
add_custom_target(
57+
tfm_footprint
58+
DEPENDS tfm_ram_report tfm_rom_report
59+
)
5060
endif()
5161

5262
if(CONFIG_TFM_BL2)
53-
foreach(report ram_report rom_report footprint)
63+
foreach(report ram_report rom_report)
5464
add_custom_target(
5565
bl2_${report}
5666
${PYTHON_EXECUTABLE}
@@ -67,6 +77,11 @@ if(CONFIG_TFM_BL2)
6777
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
6878
)
6979
endforeach()
80+
81+
add_custom_target(
82+
bl2_footprint
83+
DEPENDS bl2_ram_report bl2_rom_report
84+
)
7085
endif()
7186

7287
find_program(PUNCOVER puncover)

0 commit comments

Comments
 (0)