(env)
| 1680 | |
| 1681 | |
| 1682 | def 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()] |
no test coverage detected