diff options
author | Mathieu Féry <[email protected]> | 2023-06-15 18:44:46 +0200 |
---|---|---|
committer | Mathieu Féry <[email protected]> | 2023-06-15 18:44:46 +0200 |
commit | 00f97cc623469377c59985898b9b765ae66c0aee (patch) | |
tree | 8ecda9355a7e17b92a97cd4d9ea169026f7e290b /src/main/java/com/jogamp/gluegen/jcpp/JCPP.java | |
parent | eddcad41a1dc2658747235b307bfd4ffd2c27bd3 (diff) |
feat(feature): Enable pragma once management
Diffstat (limited to 'src/main/java/com/jogamp/gluegen/jcpp/JCPP.java')
-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 |