Class PrecompilingCommandLineCompiler
java.lang.Object
net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
net.sf.antcontrib.cpptasks.compiler.AbstractCompiler
net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler
net.sf.antcontrib.cpptasks.compiler.PrecompilingCommandLineCompiler
- All Implemented Interfaces:
Cloneable, Compiler, PrecompilingCompiler, Processor
- Direct Known Subclasses:
PrecompilingCommandLineCCompiler
public abstract class PrecompilingCommandLineCompiler
extends CommandLineCompiler
implements PrecompilingCompiler
A command line C compiler that can utilize precompilation of header files
- Author:
- Curt Arnold
-
Field Summary
Fields inherited from class AbstractProcessor
DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrecompilingCommandLineCompiler(String command, String identifierArg, String[] sourceExtensions, String[] headerExtensions, String outputSuffix, boolean libtool, PrecompilingCommandLineCompiler libtoolCompiler, boolean newEnvironment, org.apache.tools.ant.types.Environment env) -
Method Summary
Modifier and TypeMethodDescriptioncreatePrecompileConfigurations(CompilerConfiguration config, File prototype, String[] exceptFiles) 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.protected abstract CompilerConfigurationcreatePrecompileGeneratingConfig(CommandLineCompilerConfiguration baseConfig, File prototype, String lastInclude) protected abstract CompilerConfigurationcreatePrecompileUsingConfig(CommandLineCompilerConfiguration baseConfig, File prototype, String lastInclude, String[] exceptFiles) Methods inherited from class CommandLineCompiler
addImpliedArgs, addIncludes, addWarningSwitch, buildDefineArguments, compile, createConfiguration, getArgumentCountPerInputFile, getCommand, getDefineSwitch, getEnvironmentIncludePath, getIdentifier, getIncludeDirSwitch, getInputFileArgument, getLibtool, getLibtoolCompiler, getMaximumCommandLength, getMaximumInputFilesPerCommand, getTotalArgumentLengthForInputFile, getUndefineSwitch, runCommand, setCommandMethods inherited from class AbstractCompiler
canParse, createConfiguration, createParser, getBaseOutputName, getOutputFileNames, parseIncludes, resolveIncludeMethods inherited from class AbstractProcessor
bid, changeEnvironment, clone, getHeaderExtensions, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toStringMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Processor
bid, changeEnvironment, getLinker
-
Constructor Details
-
PrecompilingCommandLineCompiler
-
-
Method Details
-
createPrecompileConfigurations
public CompilerConfiguration[] createPrecompileConfigurations(CompilerConfiguration config, File prototype, String[] exceptFiles) 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 interfacePrecompilingCompiler- Parameters:
config- base configurationprototype- 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
-
createPrecompileGeneratingConfig
protected abstract CompilerConfiguration createPrecompileGeneratingConfig(CommandLineCompilerConfiguration baseConfig, File prototype, String lastInclude) -
createPrecompileUsingConfig
protected abstract CompilerConfiguration createPrecompileUsingConfig(CommandLineCompilerConfiguration baseConfig, File prototype, String lastInclude, String[] exceptFiles)
-