Merge branch 'fix/cmake_uninitialized_vars' into 'master'

fix(build): do not rely on uninitialized  variables and variables set in parent scope

See merge request espressif/esp-idf!39615
This commit is contained in:
Frantisek Hrbata
2025-06-20 08:30:30 +02:00
5 changed files with 8 additions and 0 deletions

View File

@@ -1,5 +1,7 @@
idf_build_get_property(idf_target IDF_TARGET)
set(srcs "")
if(${idf_target} STREQUAL "linux")
return() # This component is not supported by the POSIX/Linux simulator
endif()

View File

@@ -1,6 +1,8 @@
#
# Warn if the toolchain version doesn't match
#
idf_build_get_property(target IDF_TARGET)
if(NOT (${target} STREQUAL "linux" OR CMAKE_C_COMPILER_ID MATCHES "Clang"))
execute_process(
COMMAND ${CMAKE_C_COMPILER} -dumpmachine

View File

@@ -1,4 +1,5 @@
idf_build_get_property(target IDF_TARGET)
set(srcs "")
if(CONFIG_LWIP_ENABLE)
if(NOT ${target} STREQUAL "linux")

View File

@@ -66,6 +66,7 @@ else()
"src/picolibc/open_memstream.c")
endif()
set(ldfragments "")
list(APPEND ldfragments "src/newlib.lf" "src/system_libs.lf")
if(CONFIG_SPIRAM_CACHE_WORKAROUND)

View File

@@ -7,6 +7,8 @@ if(${target} STREQUAL "linux")
return()
endif()
set(sources "")
list(APPEND sources "vfs.c"
"vfs_eventfd.c"
"vfs_semihost.c"