(compiler, file, flags = [], verbose=False)
| 193 | from numpy._utils import _pep440 |
| 194 | |
| 195 | def try_compile(compiler, file, flags = [], verbose=False): |
| 196 | bk_ver = getattr(compiler, 'verbose', False) |
| 197 | compiler.verbose = verbose |
| 198 | try: |
| 199 | compiler.compile([file], extra_postargs=flags) |
| 200 | return True, '' |
| 201 | except CompileError as e: |
| 202 | return False, str(e) |
| 203 | finally: |
| 204 | compiler.verbose = bk_ver |
| 205 | |
| 206 | def flags_is_required(compiler, is_cpp, flags, code): |
| 207 | if is_cpp: |
no test coverage detected