Index: src/net/sf/antcontrib/cpptasks/OptimizationEnum.java =================================================================== RCS file: /cvsroot/ant-contrib/cpptasks/src/net/sf/antcontrib/cpptasks/OptimizationEnum.java,v retrieving revision 1.1 diff -u -r1.1 OptimizationEnum.java --- src/net/sf/antcontrib/cpptasks/OptimizationEnum.java 23 Apr 2004 21:15:45 -0000 1.1 +++ src/net/sf/antcontrib/cpptasks/OptimizationEnum.java 24 Apr 2004 19:55:52 -0000 @@ -46,9 +46,11 @@ return new String[] { "none", "size", + "minimal", "speed", "full", "aggressive", + "extreme", "unsafe" }; } Index: src/net/sf/antcontrib/cpptasks/hp/aCCCompiler.java =================================================================== RCS file: /cvsroot/ant-contrib/cpptasks/src/net/sf/antcontrib/cpptasks/hp/aCCCompiler.java,v retrieving revision 1.8 diff -u -r1.8 aCCCompiler.java --- src/net/sf/antcontrib/cpptasks/hp/aCCCompiler.java 28 Feb 2004 20:01:30 -0000 1.8 +++ src/net/sf/antcontrib/cpptasks/hp/aCCCompiler.java 24 Apr 2004 19:55:52 -0000 @@ -22,6 +22,7 @@ import net.sf.antcontrib.cpptasks.compiler.LinkType; import net.sf.antcontrib.cpptasks.compiler.Linker; import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler; +import net.sf.antcontrib.cpptasks.OptimizationEnum; import org.apache.tools.ant.types.Environment; /** @@ -48,7 +49,9 @@ super(command, "-help", false, null, newEnvironment, env); } public void addImpliedArgs(Vector args, boolean debug, - boolean multithreaded, boolean exceptions, LinkType linkType) { + boolean multithreaded, boolean exceptions, LinkType linkType, + final Boolean rtti, + final OptimizationEnum optimization) { args.addElement("-c"); if (debug) { args.addElement("-g"); Index: src/net/sf/antcontrib/cpptasks/ibm/VisualAgeCCompiler.java =================================================================== RCS file: /cvsroot/ant-contrib/cpptasks/src/net/sf/antcontrib/cpptasks/ibm/VisualAgeCCompiler.java,v retrieving revision 1.11 diff -u -r1.11 VisualAgeCCompiler.java --- src/net/sf/antcontrib/cpptasks/ibm/VisualAgeCCompiler.java 21 Apr 2004 06:22:11 -0000 1.11 +++ src/net/sf/antcontrib/cpptasks/ibm/VisualAgeCCompiler.java 24 Apr 2004 19:55:52 -0000 @@ -21,6 +21,7 @@ import net.sf.antcontrib.cpptasks.compiler.LinkType; import net.sf.antcontrib.cpptasks.compiler.Linker; import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler; +import net.sf.antcontrib.cpptasks.OptimizationEnum; import org.apache.tools.ant.types.Environment; /** @@ -47,8 +48,13 @@ Environment env) { super(command, "-help", false, null, newEnvironment, env); } - public void addImpliedArgs(Vector args, boolean debug, - boolean multithreaded, boolean exceptions, LinkType linkType) { + public void addImpliedArgs(final Vector args, + final boolean debug, + final boolean multithreaded, + final boolean exceptions, + final LinkType linkType, + final Boolean rtti, + final OptimizationEnum optimization) { args.addElement("-c"); if (debug) { args.addElement("-g"); @@ -56,6 +62,13 @@ if (linkType.isSharedLibrary()) { args.addElement("-fpic"); } + if (rtti != null) { + if (rtti.booleanValue()) { + args.addElement("-qrtti=all"); + } else { + args.addElement("-qnortti"); + } + } } public void addWarningSwitch(Vector args, int level) { switch (level) { Index: src/net/sf/antcontrib/cpptasks/sun/ForteCCCompiler.java =================================================================== RCS file: /cvsroot/ant-contrib/cpptasks/src/net/sf/antcontrib/cpptasks/sun/ForteCCCompiler.java,v retrieving revision 1.11 diff -u -r1.11 ForteCCCompiler.java --- src/net/sf/antcontrib/cpptasks/sun/ForteCCCompiler.java 28 Feb 2004 20:03:11 -0000 1.11 +++ src/net/sf/antcontrib/cpptasks/sun/ForteCCCompiler.java 24 Apr 2004 19:55:52 -0000 @@ -22,6 +22,7 @@ import net.sf.antcontrib.cpptasks.compiler.LinkType; import net.sf.antcontrib.cpptasks.compiler.Linker; import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler; +import net.sf.antcontrib.cpptasks.OptimizationEnum; /** * Adapter for the Sun (r) Forte (tm) C++ compiler * @@ -44,18 +45,36 @@ private ForteCCCompiler(String command) { super(command, "-V", false, null, false, null); } - public void addImpliedArgs(Vector args, boolean debug, - boolean multithreaded, boolean exceptions, LinkType linkType) { + public void addImpliedArgs(final Vector args, + final boolean debug, + final boolean multithreaded, + final boolean exceptions, + final LinkType linkType, + final Boolean rtti, + final OptimizationEnum optimization) { args.addElement("-c"); if (debug) { args.addElement("-g"); } + if (optimization != null) { + if (optimization.isSpeed()) { + args.addElement("-xO2"); + } + } + if (rtti != null) { + if (rtti.booleanValue()) { + args.addElement("-features=rtti"); + } else { + args.addElement("-features=no%rtti"); + } + } if (multithreaded) { args.addElement("-mt"); } if (linkType.isSharedLibrary()) { args.addElement("-KPIC"); } + } public void addWarningSwitch(Vector args, int level) { switch (level) {