Exemple #1
0
    def relate(self, node, digraph, topolist):
        Builder.relate(self, node, digraph, topolist)

        self.__have_external_libpath = set()
        self.__external_libpath = []

        self.__have_external_libraries = set()
        self.__external_libraries = []

        for n in topolist:
            for bi in n.iter_buildinfos_type(
                    BuildInfo_LibraryPath_External_CMake):
                for p in reversed(bi.libpath()):
                    if p in self.__have_external_libpath:
                        continue
                    self.__have_external_libpath.add(p)
                    self.__external_libpath.insert(0, p)
                    pass
                pass
            for bi in n.iter_buildinfos_type(BuildInfo_Library_External_CMake):
                for l in reversed(bi.libs()):
                    if l in self.__have_external_libraries:
                        continue
                    self.__have_external_libraries.add(l)
                    self.__external_libraries.insert(0, l)
                    pass
                pass
            pass

        pass
Exemple #2
0
    def relate(self, node, digraph, topolist):
        """
        Builder method. As a service (we do not do anthing meaningful
        with the information ourselves), we remember both the
        topologically sorted list of the libraries that we depend on,
        as well as the libraries that we directly depend on.
        """
        Builder.relate(self, node, digraph, topolist)

        self.__buildinfo_topo_dependent_native_libs = []
        self.__buildinfo_direct_dependent_native_libs = []

        nodes_with_library = algorithm.nearest_property(digraph=digraph, entrypoint=node, property=self.HaveLibraryProperty())
        for n in nodes_with_library:
            for bi in n.iter_buildinfos():
                if type(bi) in (BuildInfo_CLibrary_NativeLocal, BuildInfo_CLibrary_NativeInstalled):
                    self.__buildinfo_direct_dependent_native_libs.append(bi)
                    pass
                pass
            pass
        
        for n in topolist:
            for bi in n.iter_buildinfos():
                if type(bi) in (BuildInfo_CLibrary_NativeLocal, BuildInfo_CLibrary_NativeInstalled):
                    self.__buildinfo_topo_dependent_native_libs.insert(0, bi)
                    pass
                pass
            pass
        pass
Exemple #3
0
    def relate(self, node, digraph, topolist):
        """
        Builder method. Gather the automake specific build
        information, such as BuildInfo_CLibrary_External.
        """
        Builder.relate(self, node, digraph, topolist)

        self.__external_libpath = []
        self.__have_external_libpath = set()
        self.__external_libraries = []

        for n in topolist:
            for bi in n.iter_buildinfos_type(BuildInfo_Library_External_AM):
                key = '.'.join(bi.libpath())
                if not key in self.__have_external_libpath:
                    self.__have_external_libpath.add(key)
                    self.__external_libpath.insert(0, bi.libpath())
                    pass
                self.__external_libraries.insert(0, bi.libs())
                pass
            pass
        pass