fix(esp_usb_cdc_rom_console/cmake): avoid using uninitialized srcs variable

In cmakev2, the component CMakeLists.txt files are evaluated recursively
based on the component dependencies. This means that variables from
previously evaluated components are set and available in the scope of
the currently evaluated component. It is necessary to initialize every
variable that is used.

Fixes: 56e0c11bb6 ("feat(usb_cdc_console): moved usb-cdc ROM console to n..")
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
Frantisek Hrbata
2025-08-26 19:38:15 +02:00
parent 53274b85f8
commit 5edb41e548
@@ -1,5 +1,6 @@
idf_build_get_property(target IDF_TARGET)
set(srcs)
if(CONFIG_ESP_CONSOLE_USB_CDC)
list(APPEND srcs "usb_console.c")