Check if the compiler is GCC.
(cmd)
| 47 | |
| 48 | |
| 49 | def check_compiler_gcc(cmd): |
| 50 | """Check if the compiler is GCC.""" |
| 51 | |
| 52 | cmd._check_compiler() |
| 53 | body = textwrap.dedent(""" |
| 54 | int |
| 55 | main() |
| 56 | { |
| 57 | #if (! defined __GNUC__) |
| 58 | #error gcc required |
| 59 | #endif |
| 60 | return 0; |
| 61 | } |
| 62 | """) |
| 63 | return cmd.try_compile(body, None, None) |
| 64 | |
| 65 | |
| 66 | def check_gcc_version_at_least(cmd, major, minor=0, patchlevel=0): |
no test coverage detected