net.sf.antcontrib.cpptasks.gcc
Class GccCompatibleCCompiler

java.lang.Object
  extended by net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
      extended by net.sf.antcontrib.cpptasks.compiler.AbstractCompiler
          extended by net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler
              extended by net.sf.antcontrib.cpptasks.compiler.CommandLineCCompiler
                  extended by net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler
All Implemented Interfaces:
Cloneable, Compiler, Processor
Direct Known Subclasses:
aCCCompiler, ForteCCCompiler, ForteCCompiler, ForteF77Compiler, GccCCompiler, GccCCompiler, GccCCompiler, IntelLinux32CCompiler, IntelLinux32Compiler, IntelLinux64CCompiler, IntelLinux64Compiler, IntelLinuxFortranCompiler, VisualAgeCCompiler

public abstract class GccCompatibleCCompiler
extends CommandLineCCompiler

Abstract base class for compilers that attempt to be command line compatible with GCC

Author:
Adam Murdoch, Curt Arnold

Field Summary
 
Fields inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID
 
Constructor Summary
protected GccCompatibleCCompiler(String command, String identifierArg, boolean libtool, GccCompatibleCCompiler libtoolCompiler, boolean newEnvironment, org.apache.tools.ant.types.Environment env)
          Private constructor.
protected GccCompatibleCCompiler(String command, String identifierArg, String[] sourceExtensions, String[] headerExtensions, boolean libtool, GccCompatibleCCompiler libtoolCompiler, boolean newEnvironment, org.apache.tools.ant.types.Environment env)
          Private constructor.
 
Method Summary
 void addImpliedArgs(Vector args, boolean debug, boolean multithreaded, boolean exceptions, LinkType linkType, Boolean rtti, OptimizationEnum optimization)
           
 void addIncludePath(String path, Vector cmd)
          Adds an include path to the command.
 void addWarningSwitch(Vector args, int level)
           
 void getDefineSwitch(StringBuffer buffer, String define, String value)
           
protected  File[] getEnvironmentIncludePath()
           
 String getIncludeDirSwitch(String includeDir)
           
 String getIncludeDirSwitch(String includeDir, boolean isSystem)
          Added by Darren Sargent 22Oct2008 Returns the include dir switch value.
 void getUndefineSwitch(StringBuffer buffer, String define)
           
 
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.CommandLineCCompiler
createParser
 
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler
addIncludes, buildDefineArguments, compile, createConfiguration, getArgumentCountPerInputFile, getCommand, getIdentifier, getInputFileArgument, getLibtool, getLibtoolCompiler, getMaximumCommandLength, getMaximumInputFilesPerCommand, getTotalArgumentLengthForInputFile, runCommand, setCommand
 
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractCompiler
canParse, createConfiguration, getBaseOutputName, getOutputFileNames, parseIncludes, resolveInclude
 
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
bid, changeEnvironment, clone, getHeaderExtensions, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, isWindows, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.antcontrib.cpptasks.compiler.Processor
bid, changeEnvironment, getLinker
 

Constructor Detail

GccCompatibleCCompiler

protected GccCompatibleCCompiler(String command,
                                 String identifierArg,
                                 boolean libtool,
                                 GccCompatibleCCompiler libtoolCompiler,
                                 boolean newEnvironment,
                                 org.apache.tools.ant.types.Environment env)
Private constructor. Use GccCCompiler.getInstance() to get singleton instance of this class.


GccCompatibleCCompiler

protected GccCompatibleCCompiler(String command,
                                 String identifierArg,
                                 String[] sourceExtensions,
                                 String[] headerExtensions,
                                 boolean libtool,
                                 GccCompatibleCCompiler libtoolCompiler,
                                 boolean newEnvironment,
                                 org.apache.tools.ant.types.Environment env)
Private constructor. Use GccCCompiler.getInstance() to get singleton instance of this class.

Method Detail

addImpliedArgs

public void addImpliedArgs(Vector args,
                           boolean debug,
                           boolean multithreaded,
                           boolean exceptions,
                           LinkType linkType,
                           Boolean rtti,
                           OptimizationEnum optimization)
Specified by:
addImpliedArgs in class CommandLineCompiler

addIncludePath

public void addIncludePath(String path,
                           Vector cmd)
Adds an include path to the command.


addWarningSwitch

public void addWarningSwitch(Vector args,
                             int level)
Specified by:
addWarningSwitch in class CommandLineCompiler

getDefineSwitch

public void getDefineSwitch(StringBuffer buffer,
                            String define,
                            String value)
Specified by:
getDefineSwitch in class CommandLineCompiler

getEnvironmentIncludePath

protected File[] getEnvironmentIncludePath()
Specified by:
getEnvironmentIncludePath in class CommandLineCompiler

getIncludeDirSwitch

public String getIncludeDirSwitch(String includeDir)
Specified by:
getIncludeDirSwitch in class CommandLineCompiler

getIncludeDirSwitch

public String getIncludeDirSwitch(String includeDir,
                                  boolean isSystem)
Description copied from class: CommandLineCompiler
Added by Darren Sargent 22Oct2008 Returns the include dir switch value. Default implementation doesn't treat system includes specially, for compilers which don't care.

Overrides:
getIncludeDirSwitch in class CommandLineCompiler
Parameters:
includeDir - the given source value.
isSystem - "true" if this is a system include path
Returns:
the include dir switch value.

getUndefineSwitch

public void getUndefineSwitch(StringBuffer buffer,
                              String define)
Specified by:
getUndefineSwitch in class CommandLineCompiler


Copyright © 2001-2011. All Rights Reserved.