HEP-SoC / SoCMake

CMake based hardware build system
https://hep-soc.github.io/SoCMake/
GNU Lesser General Public License v3.0
8 stars 1 forks source link

Fix issue when ip_link() is called on IP defined in different src dir #84

Closed Risto97 closed 1 month ago

Risto97 commented 1 month ago

There is a quirk with INTERFACE_LINK_LIBRARIES property described here: https://cmake.org/cmake/help/v3.30/prop_tgt/INTERFACE_LINK_LIBRARIES.html

When an IP is defined in a subdirectory. If in another SOURCE directory than where IP was defined we do ip_link() linking another IP to that IP, CMake adds a wrapper around INTERFACE_LINK_LIBRARIES, like this: ::@(directory-id);...;::@

Graph traversal function should filter these directory-id elements. It is safer than modifying INTERFACE_LINK_LIBRARIES itself upon ip_link process, as it is not clear how this mechanism is useful for other generators.

Risto97 commented 1 month ago

resolve #39