Class CommandLineCompilerConfiguration
java.lang.Object
net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration
- All Implemented Interfaces:
CompilerConfiguration,ProcessorConfiguration
A configuration for a C++ compiler
- Author:
- Curt Arnold
-
Constructor Summary
ConstructorsConstructorDescriptionCommandLineCompilerConfiguration(CommandLineCompilerConfiguration base, String[] additionalArgs, String[] exceptFiles, boolean isPrecompileHeaderGeneration) CommandLineCompilerConfiguration(CommandLineCompiler compiler, String identifier, File[] includePath, File[] sysIncludePath, File[] envIncludePath, String includePathIdentifier, String[] args, ProcessorParam[] params, boolean rebuild, String[] endArgs) -
Method Summary
Modifier and TypeMethodDescriptionintAn indication of how much this compiler would like to process this filevoidcompile(CCTask task, File outputDir, String[] sourceFiles, boolean relentless, ProgressMonitor monitor) 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.String[]Returns a string representation of this configuration.File[]Returns an digest for the include path for the configuration.String[]getOutputFileNames(String inputFile, VersionInfo versionInfo) Output file name (no path components) corresponding to source fileString[]booleanIf true, all files using this configuration should be rebuilt and any existing output files should be ignoredbooleanparseIncludes(CCTask task, File baseDir, File source) toString()
-
Constructor Details
-
CommandLineCompilerConfiguration
public CommandLineCompilerConfiguration(CommandLineCompiler compiler, String identifier, File[] includePath, File[] sysIncludePath, File[] envIncludePath, String includePathIdentifier, String[] args, ProcessorParam[] params, boolean rebuild, String[] endArgs) -
CommandLineCompilerConfiguration
public CommandLineCompilerConfiguration(CommandLineCompilerConfiguration base, String[] additionalArgs, String[] exceptFiles, boolean isPrecompileHeaderGeneration)
-
-
Method Details
-
bid
Description copied from interface:ProcessorConfigurationAn indication of how much this compiler would like to process this file- Specified by:
bidin interfaceProcessorConfiguration- 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:
compilein interfaceCompilerConfiguration- 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:
createPrecompileConfigurationsin interfaceCompilerConfiguration- 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
Returns a string representation of this configuration. Should be canonical so that equivalent configurations will have equivalent string representations- Specified by:
getIdentifierin interfaceProcessorConfiguration
-
getIncludePathIdentifier
Description copied from interface:CompilerConfigurationReturns 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:
getIncludePathIdentifierin interfaceCompilerConfiguration
-
getOutputFileNames
Description copied from interface:ProcessorConfigurationOutput file name (no path components) corresponding to source file- Specified by:
getOutputFileNamesin interfaceProcessorConfiguration- Parameters:
inputFile- input file- Returns:
- output file names or zero-length array if no output file or name not determined by input file
-
getParam
- Specified by:
getParamin interfaceCompilerConfiguration
-
getParams
- Specified by:
getParamsin interfaceProcessorConfiguration
-
getRebuild
public boolean getRebuild()Description copied from interface:ProcessorConfigurationIf true, all files using this configuration should be rebuilt and any existing output files should be ignored- Specified by:
getRebuildin interfaceProcessorConfiguration
-
isPrecompileGeneration
public boolean isPrecompileGeneration()- Specified by:
isPrecompileGenerationin interfaceCompilerConfiguration
-
parseIncludes
- Specified by:
parseIncludesin interfaceCompilerConfiguration
-
toString
-
getPreArguments
-
getEndArguments
-
getIncludePath
-
getCompiler
-
getCommand
-