MCPcopy Index your code
hub / github.com/compiler-explorer/compiler-explorer / writeAllFilesCMake

Method writeAllFilesCMake

lib/base-compiler.ts:2103–2121  ·  view source on GitHub ↗
(
        dirPath: string,
        source: string,
        files: FiledataPair[],
        filters: ParseFiltersAndOutputOptions,
    )

Source from the content-addressed store, hash-verified

2101 }
2102
2103 protected async writeAllFilesCMake(
2104 dirPath: string,
2105 source: string,
2106 files: FiledataPair[],
2107 filters: ParseFiltersAndOutputOptions,
2108 ) {
2109 if (!source) throw new Error('File CMakeLists.txt has no content or file is missing');
2110
2111 const inputFilename = path.join(dirPath, 'CMakeLists.txt');
2112 await fs.writeFile(inputFilename, source);
2113
2114 if (files && files.length > 0) {
2115 await this.writeMultipleFiles(files, dirPath);
2116 }
2117
2118 return {
2119 inputFilename,
2120 };
2121 }
2122
2123 async buildExecutableInFolder(key: CacheKey, dirPath: string): Promise<BuildResult> {
2124 const writeSummary = await this.writeAllFiles(dirPath, key.source, key.files);

Callers 1

cmakeMethod · 0.95

Calls 1

writeMultipleFilesMethod · 0.95

Tested by

no test coverage detected