| 745 | pass |
| 746 | |
| 747 | def get_libraries(self, folder): |
| 748 | print('Detecting library usage...') |
| 749 | libraries = ['posix', 'gnu', 'bsd'] |
| 750 | |
| 751 | # explicitly copy as assignments in python are references |
| 752 | library_includes_re = copy.copy(self.__library_includes_re) |
| 753 | |
| 754 | def has_include(filedata): |
| 755 | lib_del = [] |
| 756 | for library, includes_re in library_includes_re.items(): |
| 757 | if includes_re.search(filedata): |
| 758 | libraries.append(library) |
| 759 | lib_del.append(library) |
| 760 | |
| 761 | for lib_d in lib_del: |
| 762 | del library_includes_re[lib_d] |
| 763 | |
| 764 | self.__iterate_files(folder, has_include) |
| 765 | print('Found libraries: {}'.format(libraries)) |
| 766 | return libraries |
| 767 | |
| 768 | |
| 769 | def get_compiler_version(): |