MCPcopy Create free account
hub / github.com/Singular/Singular / RunCPP

Function RunCPP

ppcc/src/ppcc.cc:205–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205Str *RunCPP() {
206 Str *input;
207 if (CInput->len())
208 input = CInput->at(0);
209 else
210 input = CCInput->at(0);
211 StrArr *args = A("-E", "-DPSINGULAR");
212 args->add(CPPArgs)->add(input);
213 if (debug) {
214 printf("Preprocessor: %s %s\n",
215 Compiler->c_str(),
216 StrJoin(args, " ")->c_str());
217 }
218 Str *result = ReadProcess(Compiler, args);
219 if (!result)
220 Error("preprocessor failed");
221 if (debug >= 3)
222 Print(result);
223 result = RunPreProcessor(input, result);
224 return result;
225}
226
227void PassThroughCompiler() {
228 if (debug)

Callers 1

ExecCompilerFunction · 0.85

Calls 10

AFunction · 0.85
StrJoinFunction · 0.85
ReadProcessFunction · 0.85
ErrorFunction · 0.85
RunPreProcessorFunction · 0.85
c_strMethod · 0.80
PrintFunction · 0.50
lenMethod · 0.45
atMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected