diff options
-rw-r--r-- | src/main/java/com/jogamp/gluegen/jcpp/JCPP.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/jogamp/gluegen/jcpp/JCPP.java b/src/main/java/com/jogamp/gluegen/jcpp/JCPP.java index 3e77799..3f1e057 100644 --- a/src/main/java/com/jogamp/gluegen/jcpp/JCPP.java +++ b/src/main/java/com/jogamp/gluegen/jcpp/JCPP.java @@ -43,7 +43,8 @@ public class JCPP implements GenericCPP { private final List<String> includePaths; private final boolean enableCopyOutput2Stderr; - public JCPP(final List<String> includePaths, final boolean debug, final boolean copyOutput2Stderr) { + public JCPP(final List<String> includePaths, final boolean debug, final boolean copyOutput2Stderr, + final boolean enablePragmaOnce) { LOG = Logging.getLogger(JCPP.class); setOut(System.out); this.includePaths = includePaths; @@ -55,6 +56,9 @@ public class JCPP implements GenericCPP { cpp.addFeature(Feature.LINEMARKERS); cpp.addFeature(Feature.CSYNTAX); cpp.addFeature(Feature.KEEPCOMMENTS); + if (enablePragmaOnce) { + cpp.addFeature(Feature.PRAGMA_ONCE); + } cpp.addWarning(Warning.IMPORT); cpp.setListener(new DefaultPreprocessorListener() { @Override |