aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/com/jogamp/gluegen/jcpp/CppTask.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-08-08 11:08:16 +0200
committerSven Gothel <[email protected]>2023-08-08 11:08:16 +0200
commite33d67ee14f6a5b999564b40ac0c659db92f2ce0 (patch)
tree2a314eb52ffc21f885e9bf42562234a9b93bdeea /src/main/java/com/jogamp/gluegen/jcpp/CppTask.java
parent00f97cc623469377c59985898b9b765ae66c0aee (diff)
parent5e50e75ec33f5b4567cabfd60b6baca39524a8b7 (diff)
Merge remote-tracking branch 'upstream/master' into pulled
# Conflicts: # build.gradle # gradle.properties # gradle/wrapper/gradle-wrapper.jar # gradle/wrapper/gradle-wrapper.properties # gradlew # gradlew.bat # src/main/java/com/jogamp/gluegen/jcpp/MacroTokenSource.java # src/main/java/com/jogamp/gluegen/jcpp/Preprocessor.java # src/main/java/com/jogamp/gluegen/jcpp/SourceIterator.java # src/main/java/org/anarres/cpp/Main.java # src/test/java/com/jogamp/gluegen/jcpp/PragmaTest.java # src/test/java/com/jogamp/gluegen/jcpp/RegressionTest.java # src/test/java/com/jogamp/gluegen/jcpp/VaArgsPastingTest.java
Diffstat (limited to 'src/main/java/com/jogamp/gluegen/jcpp/CppTask.java')
-rw-r--r--src/main/java/com/jogamp/gluegen/jcpp/CppTask.java38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/main/java/com/jogamp/gluegen/jcpp/CppTask.java b/src/main/java/com/jogamp/gluegen/jcpp/CppTask.java
index e3be324..da311f9 100644
--- a/src/main/java/com/jogamp/gluegen/jcpp/CppTask.java
+++ b/src/main/java/com/jogamp/gluegen/jcpp/CppTask.java
@@ -1,6 +1,6 @@
/*
* Anarres C Preprocessor
- * Copyright (c) 2007-2008, Shevek
+ * Copyright (c) 2007-2015, Shevek
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,8 +25,6 @@ import java.util.Enumeration;
import java.util.List;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.taskdefs.Copy;
-import org.apache.tools.ant.types.FilterSet;
-import org.apache.tools.ant.types.FilterSetCollection;
import org.apache.tools.ant.types.Path;
/**
@@ -117,6 +115,11 @@ public class CppTask extends Copy {
}
*/
private void preprocess(File input, File output) throws Exception {
+ if (input == null)
+ throw new BuildException("Input not specified");
+ if (output == null)
+ throw new BuildException("Output not specified");
+
Preprocessor cpp = new Preprocessor();
cpp.setListener(listener);
for (Macro macro : macros)
@@ -135,10 +138,6 @@ public class CppTask extends Copy {
}
FileWriter writer = null;
try {
- if (input == null)
- throw new BuildException("Input not specified");
- if (output == null)
- throw new BuildException("Output not specified");
cpp.addInput(input);
writer = new FileWriter(output);
for (;;) {
@@ -181,18 +180,19 @@ public class CppTask extends Copy {
try {
log("Copying " + fromFile + " to " + toFile, verbosity);
- FilterSetCollection executionFilters
- = new FilterSetCollection();
- if (filtering) {
- executionFilters
- .addFilterSet(getProject().getGlobalFilterSet());
- }
- for (Enumeration filterEnum = getFilterSets().elements();
- filterEnum.hasMoreElements();) {
- executionFilters
- .addFilterSet((FilterSet) filterEnum.nextElement());
- }
-
+ /*
+ FilterSetCollection executionFilters
+ = new FilterSetCollection();
+ if (filtering) {
+ executionFilters
+ .addFilterSet(getProject().getGlobalFilterSet());
+ }
+ for (Enumeration filterEnum = getFilterSets().elements();
+ filterEnum.hasMoreElements();) {
+ executionFilters
+ .addFilterSet((FilterSet) filterEnum.nextElement());
+ }
+ */
File srcFile = new File(fromFile);
File dstFile = new File(toFile);
preprocess(srcFile, dstFile);