diff options
author | Phil Howard <phil@gadgetoid.com> | 2024-06-28 16:01:12 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-10-15 11:51:56 +1100 |
commit | 525fce717030e0be98adcd983c1df663717a74a5 (patch) | |
tree | c044236a39f73d836467ee6feb05492488d8d210 /py | |
parent | fa942d532f326b3b8c5d4cb68439ad6669beb1e4 (diff) | |
download | micropython-525fce717030e0be98adcd983c1df663717a74a5.tar.gz micropython-525fce717030e0be98adcd983c1df663717a74a5.zip |
py/usermod.cmake: Check target exists in usermod_gather_sources.
Check a target exists before accessing properties. Otherwise
usermod_gather_sources would recurse into garbage property names and break.
Signed-off-by: Phil Howard <phil@gadgetoid.com>
Diffstat (limited to 'py')
-rw-r--r-- | py/usermod.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/py/usermod.cmake b/py/usermod.cmake index 8532762837..c814369a48 100644 --- a/py/usermod.cmake +++ b/py/usermod.cmake @@ -5,6 +5,10 @@ function(usermod_gather_sources SOURCES_VARNAME INCLUDE_DIRECTORIES_VARNAME INCL if (NOT ${LIB} IN_LIST ${INCLUDED_VARNAME}) list(APPEND ${INCLUDED_VARNAME} ${LIB}) + if (NOT TARGET ${LIB}) + return() + endif() + # Gather library sources get_target_property(lib_sources ${LIB} INTERFACE_SOURCES) if (lib_sources) |