cmake: Set COMPONENT_PATH during early expansion of dependencies
Works around bug where components/soc/CMakeLists.txt was testing "EXISTS ${COMPONENT_PATH}/${SOC_NAME}" and this test could pass during early expansion if COMPONENT_PATH was empty and a directory /esp32 exists on Windows. Closes https://github.com/espressif/esp-idf/issues/3195
This commit is contained in:
parent
3cec8d0122
commit
2c91bc7a50
1 changed files with 5 additions and 5 deletions
|
@ -92,9 +92,9 @@ function(expand_component_requirements component)
|
||||||
endif()
|
endif()
|
||||||
set_property(GLOBAL APPEND PROPERTY SEEN_COMPONENTS ${component})
|
set_property(GLOBAL APPEND PROPERTY SEEN_COMPONENTS ${component})
|
||||||
|
|
||||||
find_component_path("${component}" "${ALL_COMPONENTS}" "${ALL_COMPONENT_PATHS}" component_path)
|
find_component_path("${component}" "${ALL_COMPONENTS}" "${ALL_COMPONENT_PATHS}" COMPONENT_PATH)
|
||||||
debug("Expanding dependencies of ${component} @ ${component_path}")
|
debug("Expanding dependencies of ${component} @ ${COMPONENT_PATH}")
|
||||||
if(NOT component_path)
|
if(NOT COMPONENT_PATH)
|
||||||
set_property(GLOBAL APPEND PROPERTY COMPONENTS_NOT_FOUND ${component})
|
set_property(GLOBAL APPEND PROPERTY COMPONENTS_NOT_FOUND ${component})
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
@ -104,7 +104,7 @@ function(expand_component_requirements component)
|
||||||
unset(COMPONENT_REQUIRES)
|
unset(COMPONENT_REQUIRES)
|
||||||
unset(COMPONENT_PRIV_REQUIRES)
|
unset(COMPONENT_PRIV_REQUIRES)
|
||||||
set(COMPONENT ${component})
|
set(COMPONENT ${component})
|
||||||
include(${component_path}/CMakeLists.txt)
|
include(${COMPONENT_PATH}/CMakeLists.txt)
|
||||||
|
|
||||||
get_property(requires GLOBAL PROPERTY "${component}_REQUIRES")
|
get_property(requires GLOBAL PROPERTY "${component}_REQUIRES")
|
||||||
get_property(requires_priv GLOBAL PROPERTY "${component}_PRIV_REQUIRES")
|
get_property(requires_priv GLOBAL PROPERTY "${component}_PRIV_REQUIRES")
|
||||||
|
@ -124,7 +124,7 @@ function(expand_component_requirements component)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Now append this component to the full list (after its dependencies)
|
# Now append this component to the full list (after its dependencies)
|
||||||
set_property(GLOBAL APPEND PROPERTY BUILD_COMPONENT_PATHS ${component_path})
|
set_property(GLOBAL APPEND PROPERTY BUILD_COMPONENT_PATHS ${COMPONENT_PATH})
|
||||||
set_property(GLOBAL APPEND PROPERTY BUILD_COMPONENTS ${component})
|
set_property(GLOBAL APPEND PROPERTY BUILD_COMPONENTS ${component})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue