Skip to content

Commit c55caba

Browse files
author
Benoit Denkinger
committed
Getting read of __flat_graph in get_ip_links and added NO_DEPS to ip_recursive_get_target_property.
1 parent 03be972 commit c55caba

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

cmake/hwip.cmake

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -845,16 +845,16 @@ function(get_ip_links OUTVAR IP_LIB)
845845

846846
alias_dereference(_reallib ${IP_LIB})
847847

848-
if(ARG_NO_DEPS)
849-
get_property(__flat_graph TARGET ${_reallib} PROPERTY INTERFACE_LINK_LIBRARIES)
850-
else()
851-
if(ARG_EXCLUDED_IPS)
852-
set(ARG_EXCLUDED_IPS EXCLUDED_IPS ${ARG_EXCLUDED_IPS})
853-
endif()
848+
if(ARG_EXCLUDED_IPS)
849+
set(ARG_EXCLUDED_IPS EXCLUDED_IPS ${ARG_EXCLUDED_IPS})
850+
endif()
854851

855-
ip_recursive_get_target_property(__linked_ips ${_reallib} INTERFACE_LINK_LIBRARIES ${ARG_EXCLUDED_IPS})
852+
if(ARG_NO_DEPS)
853+
set(ARG_NO_DEPS NO_DEPS)
856854
endif()
857855

856+
ip_recursive_get_target_property(__linked_ips ${_reallib} INTERFACE_LINK_LIBRARIES ${ARG_EXCLUDED_IPS} ${ARG_NO_DEPS})
857+
858858
set(${OUTVAR} ${__linked_ips} ${_reallib} PARENT_SCOPE)
859859
endfunction()
860860

@@ -997,7 +997,7 @@ endfunction()
997997
#
998998
#]]
999999
function(ip_recursive_get_target_property OUTVAR IP_LIB PROPERTY)
1000-
cmake_parse_arguments(ARG "" "" "EXCLUDED_IPS" ${ARGN})
1000+
cmake_parse_arguments(ARG "NO_DEPS" "" "EXCLUDED_IPS" ${ARGN})
10011001
if(ARG_UNPARSED_ARGUMENTS)
10021002
message(FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} passed unrecognized argument " "${ARG_UNPARSED_ARGUMENTS}")
10031003
endif()
@@ -1029,10 +1029,12 @@ function(ip_recursive_get_target_property OUTVAR IP_LIB PROPERTY)
10291029
if(NOT ${_subtarget} IN_LIST _excluded_ips_reallib_list)
10301030
# Add the current target to the list
10311031
list(APPEND _seen_values ${_subtarget})
1032-
# Recusrive call to search for the property in the sub-target
1033-
ip_recursive_get_target_property(_recursive_values ${_subtarget} ${PROPERTY} ${ARG_EXCLUDED_IPS})
1034-
# Add the recursively collected target to the list
1035-
list(PREPEND _seen_values ${_recursive_values})
1032+
if(NOT ARG_NO_DEPS)
1033+
# Recursive call to search for the property in the sub-target only if NO_DEPS is not set
1034+
ip_recursive_get_target_property(_recursive_values ${_subtarget} ${PROPERTY} ${ARG_EXCLUDED_IPS})
1035+
# Add the recursively collected target to the list
1036+
list(PREPEND _seen_values ${_recursive_values})
1037+
endif()
10361038
# Remove duplicates keeping the first appearing instance
10371039
list(REMOVE_DUPLICATES _seen_values)
10381040
else()

0 commit comments

Comments
 (0)