[llvm-bugs] [Bug 49508] New: Dependencies in INTERFACE_LINK_LIBRARIES should be detected with find_dependency

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 10 04:24:34 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=49508

            Bug ID: 49508
           Summary: Dependencies in INTERFACE_LINK_LIBRARIES should be
                    detected with find_dependency
           Product: Build scripts
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: mario at emmenlauer.de
                CC: llvm-bugs at lists.llvm.org

Currently `LLVMExports.cmake` contains `INTERFACE_LINK_LIBRARIES` with entries
like `"z;rt;dl;tinfo;-lpthread;m;LLVMDemangle"` for the LLVM Ubuntu packages.
This assumes that a user has library `z` and others available in a system
directory, which may not necessarily be the case.

Modern clean cmake policy suggests that library dependencies should be searched
with `find_dependency` (see
https://cmake.org/cmake/help/latest/module/CMakeFindDependencyMacro.html)
rather than hardcoded. This will allow to include paths in the search that a
user configured for the original main cmake project. I.e. it allows users to
say `cmake -DCMAKE_PREFIX_PATH=xxx`, to add a number of non-standard
directories to the search list.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210310/c5e5ca17/attachment.html>


More information about the llvm-bugs mailing list