Class CommandLineCompilerConfiguration

java.lang.Object
net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration
All Implemented Interfaces:
CompilerConfiguration, ProcessorConfiguration

public final class CommandLineCompilerConfiguration extends Object implements CompilerConfiguration
A configuration for a C++ compiler
  • Field Details

    • args

      private String[] args
    • compiler

      private CommandLineCompiler compiler
    • endArgs

      private String[] endArgs
    • envIncludePath

      private File[] envIncludePath
    • exceptFiles

      private String[] exceptFiles
    • identifier

      private String identifier
    • includePath

      private File[] includePath
    • includePathIdentifier

      private String includePathIdentifier
    • isPrecompiledHeaderGeneration

      private boolean isPrecompiledHeaderGeneration
    • params

      private ProcessorParam[] params
    • rebuild

      private boolean rebuild
    • sysIncludePath

      private File[] sysIncludePath
  • Constructor Details

  • Method Details

    • bid

      public int bid(String inputFile)
      Description copied from interface: ProcessorConfiguration
      An indication of how much this compiler would like to process this file
      Specified by:
      bid in interface ProcessorConfiguration
      Returns:
      0 is no interest to process, 100 is strong interest to process
    • compile

      public void compile(CCTask task, File outputDir, String[] sourceFiles, boolean relentless, ProgressMonitor monitor) throws org.apache.tools.ant.BuildException
      Specified by:
      compile in interface CompilerConfiguration
      Throws:
      org.apache.tools.ant.BuildException
    • createPrecompileConfigurations

      public CompilerConfiguration[] createPrecompileConfigurations(File prototype, String[] nonPrecompiledFiles)
      This method may be used to get two distinct compiler configurations, one for compiling the specified file and producing a precompiled header file, and a second for compiling other files using the precompiled header file. The last (preferrably only) include directive in the prototype file will be used to mark the boundary between pre-compiled and normally compiled headers.
      Specified by:
      createPrecompileConfigurations in interface CompilerConfiguration
      Parameters:
      prototype - A source file (for example, stdafx.cpp) that is used to build the precompiled header file. @returns null if precompiled headers are not supported or a two element array containing the precompiled header generation configuration and the consuming configuration
    • getIdentifier

      public String getIdentifier()
      Returns a string representation of this configuration. Should be canonical so that equivalent configurations will have equivalent string representations
      Specified by:
      getIdentifier in interface ProcessorConfiguration
    • getIncludePathIdentifier

      public String getIncludePathIdentifier()
      Description copied from interface: CompilerConfiguration
      Returns an digest for the include path for the configuration. This is used to determine if cached dependency information is invalid because the include paths have changed
      Specified by:
      getIncludePathIdentifier in interface CompilerConfiguration
    • getOutputFileNames

      public String[] getOutputFileNames(String inputFile, VersionInfo versionInfo)
      Description copied from interface: ProcessorConfiguration
      Output file name (no path components) corresponding to source file
      Specified by:
      getOutputFileNames in interface ProcessorConfiguration
      Parameters:
      inputFile - input file
      Returns:
      output file names or zero-length array if no output file or name not determined by input file
    • getParam

      public CompilerParam getParam(String name)
      Specified by:
      getParam in interface CompilerConfiguration
    • getParams

      public ProcessorParam[] getParams()
      Specified by:
      getParams in interface ProcessorConfiguration
    • getRebuild

      public boolean getRebuild()
      Description copied from interface: ProcessorConfiguration
      If true, all files using this configuration should be rebuilt and any existing output files should be ignored
      Specified by:
      getRebuild in interface ProcessorConfiguration
    • isPrecompileGeneration

      public boolean isPrecompileGeneration()
      Specified by:
      isPrecompileGeneration in interface CompilerConfiguration
    • parseIncludes

      public DependencyInfo parseIncludes(CCTask task, File baseDir, File source)
      Specified by:
      parseIncludes in interface CompilerConfiguration
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getPreArguments

      public String[] getPreArguments()
    • getEndArguments

      public String[] getEndArguments()
    • getIncludePath

      public File[] getIncludePath()
    • getCompiler

      public Compiler getCompiler()
    • getCommand

      public String getCommand()