MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / get_default_include_paths

Function get_default_include_paths

methods.py:1682–1694  ·  view source on GitHub ↗
(env)

Source from the content-addressed store, hash-verified

1680
1681
1682def get_default_include_paths(env):
1683 if env.msvc:
1684 return []
1685 compiler = env.subst("$CXX")
1686 target = os.path.join(env.Dir("#main").abspath, "main.cpp")
1687 args = [compiler, target, "-x", "c++", "-v"]
1688 ret = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
1689 output = ret.stdout
1690 match = re.search(r"#include <\.\.\.> search starts here:([\S\s]*)End of search list.", output)
1691 if not match:
1692 print_warning("Failed to find the include paths in the compiler output.")
1693 return []
1694 return [x.strip() for x in match[1].strip().splitlines()]

Callers 1

generate_vs_projectFunction · 0.85

Calls 5

print_warningFunction · 0.90
joinMethod · 0.80
stripMethod · 0.80
runMethod · 0.45
searchMethod · 0.45

Tested by

no test coverage detected