From 8ecea4f8c6a27cabb4bfbcabe9bf5b4d24b9483f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Peja=C5=A1inovi=C4=87?= Date: Fri, 4 Oct 2024 23:40:12 +0200 Subject: [PATCH] Safer but slower solution, just filter the list for ::@ --- cmake/utils/socmake_graph.cmake | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/cmake/utils/socmake_graph.cmake b/cmake/utils/socmake_graph.cmake index e36b9f1..aecda1c 100644 --- a/cmake/utils/socmake_graph.cmake +++ b/cmake/utils/socmake_graph.cmake @@ -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}) @@ -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)