aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-06-18 04:33:54 +0200
committerSven Gothel <[email protected]>2023-06-18 04:33:54 +0200
commit7825c4c053e0755e5dc0aa20127914887efa75e4 (patch)
treeb23eb73e3386cd109aa69fe3ed8ea1bd153e9c6d /src/java/com/jogamp
parent1159dadbdca861e4a6dd47e9da3ccb47ec15f4a3 (diff)
CPP Enable Pragma Once: Default is 'true', since usually all compiler and APIs do support this feature
Diffstat (limited to 'src/java/com/jogamp')
-rw-r--r--src/java/com/jogamp/gluegen/GlueGen.java7
-rw-r--r--src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/java/com/jogamp/gluegen/GlueGen.java b/src/java/com/jogamp/gluegen/GlueGen.java
index beeb918..f2a5c6b 100644
--- a/src/java/com/jogamp/gluegen/GlueGen.java
+++ b/src/java/com/jogamp/gluegen/GlueGen.java
@@ -380,7 +380,7 @@ public class GlueGen implements GlueEmitterControls {
String outputRootDir = null;
final List<String> cfgFiles = new ArrayList<String>();
boolean copyCPPOutput2Stderr = false;
- boolean enablePragmaOnce = false;
+ boolean enablePragmaOnce = true;
final List<String> includePaths = new ArrayList<String>();
for (int i = 0; i < args.length; i++) {
@@ -404,6 +404,8 @@ public class GlueGen implements GlueEmitterControls {
copyCPPOutput2Stderr=true;
} else if (arg.equals("--enablePragmaOnce")) {
enablePragmaOnce=true;
+ } else if (arg.equals("--disablePragmaOnce")) {
+ enablePragmaOnce=true;
} else {
usage();
}
@@ -453,7 +455,8 @@ public class GlueGen implements GlueEmitterControls {
out.println("-Cjava-emitter.cfg.");
out.println(" --debug enables debug mode");
out.println(" --dumpCPP directs CPP to dump all output to stderr as well");
- out.println(" --enablePragmaOnce allow handle of #pragma once directive during parsing");
+ out.println(" --enablePragmaOnce allow handle of #pragma once directive during parsing (default)");
+ out.println(" --disablePragmaOnce disable handling of #pragma once directive during parsing");
exit(1);
}
}
diff --git a/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java b/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java
index d785dad..1072675 100644
--- a/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java
+++ b/src/java/com/jogamp/gluegen/structgen/CStructAnnotationProcessor.java
@@ -100,7 +100,7 @@ public class CStructAnnotationProcessor extends AbstractProcessor {
private static final String STRUCTGENOUTPUT_OPTION = "structgen.output";
private static final String STRUCTGENPRAGMA_ONCE = "structgen.enable.pragma.once";
private static final String STRUCTGENOUTPUT = PropertyAccess.getProperty("jogamp.gluegen."+STRUCTGENOUTPUT_OPTION, true, "gensrc");
- private static final String STRUCTGENPRAGMAONCE = PropertyAccess.getProperty("jogamp.gluegen."+STRUCTGENPRAGMA_ONCE, true, "false");
+ private static final String STRUCTGENPRAGMAONCE = PropertyAccess.getProperty("jogamp.gluegen."+STRUCTGENPRAGMA_ONCE, true, "true");
private Filer filer;
private Messager messager;