Jogamp
Remove warnings, turn on linting, fix Eclipse.
authorWade Walker <wwalker3@austin.rr.com>
Fri, 7 Mar 2014 22:28:41 +0000 (16:28 -0600)
committerWade Walker <wwalker3@austin.rr.com>
Fri, 7 Mar 2014 22:28:41 +0000 (16:28 -0600)
Removed warnings due to memoryMaximumSize being ignored when javac isn't
forked. Turned on all linting. Changed the arguments of
uncomment-function-params so it will run from within Eclipse properly
(using basedir instead of user.dir, since only the former will be
properly set both inside Eclipse and on the command line).

make/build-test.xml
make/build.xml

index b1ae12d..0325cdf 100644 (file)
                source="${target.sourcelevel}" 
                target="${target.targetlevel}" 
                bootclasspath="${target.rt.jar}"
-               debug="${javacdebug}" debuglevel="${javacdebuglevel}"/>
+               debug="${javacdebug}" debuglevel="${javacdebuglevel}">
+            <compilerarg value="-Xlint:all"/>
+        </javac>
         <copy file="joclversion-test"
             tofile="${build.test}/manifest-test.mf"
             overwrite="true">
                bootclasspath="${target.rt.jar}"
                debug="${javacdebug}" debuglevel="${javacdebuglevel}">
             <src path="${src.test}" />
+            <compilerarg value="-Xlint:all"/>
         </javac>
         <copy file="joclversion-test-android"
             tofile="${build.test}/manifest-test-android.mf"
index e7425eb..5bd8c6e 100644 (file)
                bootclasspath="${target.rt.jar}"
                debug="${javacdebug}" debuglevel="${javacdebuglevel}">
             <src path="${basedir}/../etc/src"/>
+            <compilerarg value="-Xlint:all"/>
         </javac>
 
         <taskdef name="update-headers"            classname="com.jogamp.ant.HeaderFileDownloader"     classpath="${etc.build.dir}"/>
         <mkdir dir="${headers.dest}"/>
 
         <!--uncomment function names in c headers and copy modified files into include path-->
-        <uncomment-function-params src="${headers.orig}/cl.h" dest="${headers.dest}/cl.h"/>
-        <uncomment-function-params src="${headers.orig}/cl_gl.h" dest="${headers.dest}/cl_gl.h"/>
+        <!-- need to pass in basedir or it won't work inside Eclipse, where user.dir is Eclipse's bin dir-->
+        <uncomment-function-params src="${basedir}/${headers.orig}/cl.h" dest="${basedir}/${headers.dest}/cl.h"/>
+        <uncomment-function-params src="${basedir}/${headers.orig}/cl_gl.h" dest="${basedir}/${headers.dest}/cl_gl.h"/>
 
         <!--nothing to uncomment in this headers-->
         <copy file="${headers.orig}/cl_platform.h" toDir="${headers.dest}" overwrite="true"/>
         <javac destdir="${classes}" 
                includeantruntime="false"
                excludes="${java.part.android}"
-               memoryMaximumSize="${javac.memorymax}"
                encoding="UTF-8"
                source="${target.sourcelevel}" 
                target="${target.targetlevel}" 
                <classpath refid="javac.classpath"/>
                <src path="${src.java}" />
             <src path="${src.generated.java}" />
+            <compilerarg value="-Xlint:all"/>
+            <!-- suppress warning due to @CLProperty annotation, which is used at runtime but not during compilation -->
+            <compilerarg value="-Xlint:-processing"/>
         </javac>
     </target>
 
         <!--compile gluegen-rt-android last-->
         <javac destdir="${classes}" 
                includeantruntime="false"
-               memoryMaximumSize="${javac.memorymax}"
                encoding="UTF-8"
                source="${target.sourcelevel}" 
                target="${target.targetlevel}" 
                <classpath refid="javac.android.classpath"/>
                <src path="${src.java}" />
             <src path="${src.generated.java}" />
+            <compilerarg value="-Xlint:all"/>
         </javac>
     </target>
 
http://JogAmp.org git info: FAQ, tutorial and man pages.