mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(cmakev2/project): unset global variables in idf_project_init macro
The idf_project_init macro is evaluated within the global variable scope, and currently, there are a few variables still set. Let's ensure all variables are properly unset to avoid polluting the global variable namespace. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
@@ -596,6 +596,7 @@ macro(idf_project_init)
|
|||||||
idf_die("sdkconfig.cmake file not found.")
|
idf_die("sdkconfig.cmake file not found.")
|
||||||
endif()
|
endif()
|
||||||
include("${sdkconfig_cmake}")
|
include("${sdkconfig_cmake}")
|
||||||
|
unset(sdkconfig_cmake)
|
||||||
|
|
||||||
# Initialize the target architecture based on the configuration
|
# Initialize the target architecture based on the configuration
|
||||||
# Ensure this is done after including the sdkconfig.
|
# Ensure this is done after including the sdkconfig.
|
||||||
@@ -636,6 +637,7 @@ macro(idf_project_init)
|
|||||||
idf_component_include("${component_name}")
|
idf_component_include("${component_name}")
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
unset(include_all_components)
|
||||||
|
|
||||||
idf_build_set_property(__PROJECT_INITIALIZED YES)
|
idf_build_set_property(__PROJECT_INITIALIZED YES)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user