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
committed by BOT
parent 6152758c99
commit 22cf5a61ef
@@ -1,5 +1,6 @@
idf_build_get_property(target IDF_TARGET) idf_build_get_property(target IDF_TARGET)
set(srcs)
if(CONFIG_ESP_CONSOLE_USB_CDC) if(CONFIG_ESP_CONSOLE_USB_CDC)
list(APPEND srcs "usb_console.c") list(APPEND srcs "usb_console.c")