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

Callers 1

lint_all_filesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected