MCPcopy Create free account
hub / github.com/ClickHouse/ai-sdk-cpp / get_system_include_args

Function get_system_include_args

scripts/lint.py:48–72  ·  view source on GitHub ↗

Get system include paths for macOS.

()

Source from the content-addressed store, hash-verified

46
47
48def get_system_include_args() -> List[str]:
49 """Get system include paths for macOS."""
50 if sys.platform != "darwin":
51 return []
52
53 try:
54 # Get Xcode path
55 result = subprocess.run(["xcode-select", "-p"], capture_output=True, text=True)
56 if result.returncode != 0:
57 xcode_path = "/Applications/Xcode.app/Contents/Developer"
58 else:
59 xcode_path = result.stdout.strip()
60
61 sdk_path = Path(xcode_path) / "Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
62
63 if sdk_path.exists():
64 return [
65 f"--extra-arg=-isystem{sdk_path}/usr/include/c++/v1",
66 f"--extra-arg=-isystem{sdk_path}/usr/include",
67 f"--extra-arg=-isystem{xcode_path}/Toolchains/XcodeDefault.xctoolchain/usr/include"
68 ]
69 except Exception:
70 pass
71
72 return []
73
74
75def find_cpp_files() -> List[Path]:

Callers 1

lint_all_filesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected