MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / getIncludeArguments

Method getIncludeArguments

lib/base-compiler.ts:1091–1104  ·  view source on GitHub ↗
(libraries: SelectedLibraryVersion[], dirPath: string)

Source from the content-addressed store, hash-verified

1089 }
1090
1091 getIncludeArguments(libraries: SelectedLibraryVersion[], dirPath: string): string[] {
1092 const includeFlag = this.compiler.includeFlag || '-I';
1093 return libraries.flatMap(selectedLib => {
1094 const foundVersion = this.findLibVersion(selectedLib);
1095 if (!foundVersion) return [];
1096
1097 const paths = foundVersion.path.map(path => includeFlag + path);
1098 if (foundVersion.packagedheaders) {
1099 const includePath = path.join(dirPath, selectedLib.id, 'include');
1100 paths.push(includeFlag + includePath);
1101 }
1102 return paths;
1103 });
1104 }
1105
1106 getLibraryOptions(libraries: SelectedLibraryVersion[]): string[] {
1107 return libraries.flatMap(selectedLib => {

Callers 2

prepareArgumentsMethod · 0.95
createCmakeExecParamsMethod · 0.95

Calls 2

findLibVersionMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected