There was an error while loading. Please reload this page.
1 parent 58177cc commit 6a842ffCopy full SHA for 6a842ff
2 files changed
mode/CppMode.jar
-8 Bytes
src/java/CppBuild.java
@@ -3197,7 +3197,9 @@ else if (!cmd.contains(defaultsCpp.getAbsolutePath()))
3197
// main() is now emitted inside Sketch_run.cpp by writeSketch() -- don't link main.cpp
3198
// Use precompiled header if available -- cuts sketch compile time significantly.
3199
if (processingPch.exists() && !needsPch) {
3200
- cmd.add("-include-pch"); cmd.add(processingPch.getAbsolutePath());
+ // GCC automatically uses Processing.h.gch when the directory
3201
+ // containing it appears before the src dir in the include path.
3202
+ cmd.add("-I"); cmd.add(processingPch.getParentFile().getAbsolutePath());
3203
}
3204
cmd.add("-I" + runtimeDir.getAbsolutePath());
3205
cmd.add("-o"); cmd.add(bin.getAbsolutePath());
0 commit comments