(lib)
| 142 | |
| 143 | |
| 144 | def check_c_lib(lib): |
| 145 | test_c_file = '%s/test.c' % DEPS_DIR |
| 146 | test_e_file = '%s/test' % DEPS_DIR |
| 147 | |
| 148 | src = """ |
| 149 | int main() |
| 150 | { |
| 151 | return 0; |
| 152 | } |
| 153 | """ |
| 154 | |
| 155 | try: |
| 156 | with open(test_c_file, 'w') as fp: |
| 157 | fp.write(textwrap.dedent(src)) |
| 158 | |
| 159 | return cmd_success('gcc %s -l%s %s %s -o %s' % |
| 160 | (test_c_file, lib, ' '.join(cxx_flags), |
| 161 | ' '.join(ld_flags), test_e_file)) |
| 162 | finally: |
| 163 | cmd('rm -f %s %s' % (test_c_file, test_e_file), quiet=True) |
| 164 | |
| 165 | |
| 166 | def required(header_file, lib_name, compiler): |
no test coverage detected