MCPcopy Create free account
hub / github.com/numpy/numpy / check_compiler_gcc

Function check_compiler_gcc

numpy/distutils/command/autodist.py:49–63  ·  view source on GitHub ↗

Check if the compiler is GCC.

(cmd)

Source from the content-addressed store, hash-verified

47
48
49def 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
66def check_gcc_version_at_least(cmd, major, minor=0, patchlevel=0):

Callers 1

check_compiler_gccMethod · 0.90

Calls 1

_check_compilerMethod · 0.80

Tested by

no test coverage detected