Skip to content

Commit

Permalink
Safer but slower solution, just filter the list for ::@
Browse files Browse the repository at this point in the history
  • Loading branch information
Risto97 committed Oct 4, 2024
1 parent ad089dc commit 8ecea4f
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions cmake/utils/socmake_graph.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ function(__flatten_graph_recursive NODE RET)
endif()

# Workaround a mechanism described in (https://cmake.org/cmake/help/v3.30/prop_tgt/INTERFACE_LINK_LIBRARIES.html)
list(GET LINK_LIBS -1 LAST_LIB)
if(LAST_LIB STREQUAL "::@")
list(FILTER LINK_LIBS EXCLUDE REGEX "::@")
endif()
list(FILTER LINK_LIBS EXCLUDE REGEX "::@")

# message("LINK LIBS for lib: ${NODE} are: ${LINK_LIBS}")
foreach(lib ${LINK_LIBS})
Expand Down Expand Up @@ -108,13 +105,9 @@ function(__all_vertices_removed NODE RET)
endif()
if(LINK_LIBS STREQUAL "LINK_LIBS-NOTFOUND")
set(LINK_LIBS "")
else()
# Workaround a mechanism described in (https://cmake.org/cmake/help/v3.30/prop_tgt/INTERFACE_LINK_LIBRARIES.html)
list(GET LINK_LIBS -1 LAST_LIB)
if(LAST_LIB STREQUAL "::@")
list(FILTER LINK_LIBS EXCLUDE REGEX "::@")
endif()
endif()
# Workaround a mechanism described in (https://cmake.org/cmake/help/v3.30/prop_tgt/INTERFACE_LINK_LIBRARIES.html)
list(FILTER LINK_LIBS EXCLUDE REGEX "::@")

compare_lists("${RM_LIST}" "${LINK_LIBS}" L_EQ)
set(${RET} ${L_EQ} PARENT_SCOPE)
Expand Down

0 comments on commit 8ecea4f

Please sign in to comment.