Class OpenWatcomCompiler

All Implemented Interfaces:
Cloneable, Compiler, Processor
Direct Known Subclasses:
OpenWatcomCCompiler, OpenWatcomFortranCompiler

public abstract class OpenWatcomCompiler extends CommandLineCompiler
An abstract base class for the OpenWatcom C and Fortran compilers.
Author:
Curt Arnold
  • Constructor Details

    • OpenWatcomCompiler

      protected OpenWatcomCompiler(String command, String identifierArg, String[] sourceExtensions, String[] headerExtensions, boolean newEnvironment, org.apache.tools.ant.types.Environment env)
      Constructor.
      Parameters:
      command - String command
      identifierArg - String identifier
      sourceExtensions - String[] source extension
      headerExtensions - String[] header extension
      newEnvironment - boolean use new enviroment
      env - Environment environment
  • Method Details

    • addImpliedArgs

      protected final void addImpliedArgs(Vector args, boolean debug, boolean multithreaded, boolean exceptions, LinkType linkType, Boolean rtti, OptimizationEnum optimization)
      Add implied arguments.
      Specified by:
      addImpliedArgs in class CommandLineCompiler
      Parameters:
      args - Vector command line arguments
      debug - boolean is debug
      multithreaded - boolean multithreaderd
      exceptions - boolean support exceptions
      linkType - LinkType link type
      rtti - Boolean run time type information
      optimization - OptimizationEnum
    • addWarningSwitch

      protected final void addWarningSwitch(Vector args, int level)
      Add warning switch.
      Specified by:
      addWarningSwitch in class CommandLineCompiler
      Parameters:
      args - Vector command line arguments
      level - int warning level
    • changeEnvironment

      public final Processor changeEnvironment(boolean newEnvironment, org.apache.tools.ant.types.Environment env)
      Change enviroment.
      Specified by:
      changeEnvironment in interface Processor
      Overrides:
      changeEnvironment in class AbstractProcessor
      Parameters:
      newEnvironment - boolean use new enviroment
      env - Environment environment
      Returns:
      Processor modified processor
    • getDefineSwitch

      protected final void getDefineSwitch(StringBuffer buffer, String define, String value)
      Get define switch.
      Specified by:
      getDefineSwitch in class CommandLineCompiler
      Parameters:
      buffer - StringBuffer buffer
      define - String preprocessor macro
      value - String value, may be null.
    • getEnvironmentIncludePath

      protected final File[] getEnvironmentIncludePath()
      Get include path from environment.
      Specified by:
      getEnvironmentIncludePath in class CommandLineCompiler
      Returns:
      File[]
    • getIncludeDirSwitch

      protected final String getIncludeDirSwitch(String includeDir)
      Get include directory switch.
      Specified by:
      getIncludeDirSwitch in class CommandLineCompiler
      Parameters:
      includeDir - String include directory
      Returns:
      String command line argument
    • getMaximumCommandLength

      public final int getMaximumCommandLength()
      Get maximum command line length.
      Specified by:
      getMaximumCommandLength in class CommandLineCompiler
      Returns:
      int maximum command line length
    • getUndefineSwitch

      protected final void getUndefineSwitch(StringBuffer buffer, String define)
      Get undefine switch.
      Specified by:
      getUndefineSwitch in class CommandLineCompiler
      Parameters:
      buffer - StringBuffer argument destination
      define - String preprocessor macro