MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / detect_make

Function detect_make

tools/donate_cpu_lib.py:33–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31__make_cmd = None
32
33def detect_make():
34 make_cmds = ['make', 'mingw32-make']
35 if sys.platform == 'win32':
36 make_cmds.append('msbuild.exe')
37
38 for m in make_cmds:
39 try:
40 subprocess.check_call([m, '--version'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
41 except OSError:
42 continue
43
44 print("using '{}'".format(m))
45 return m
46
47 print("Error: a make command ({}) is required".format(','.join(make_cmds)))
48 return None
49
50
51def check_requirements():

Callers 1

check_requirementsFunction · 0.85

Calls 2

formatMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected