Class AbstractCompiler
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.codehaus.mojo.natives.compiler.AbstractCompiler
- All Implemented Interfaces:
Compiler,org.codehaus.plexus.logging.LogEnabled
public abstract class AbstractCompiler
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements Compiler
-
Nested Class Summary
Nested Classes -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompile(CompilerConfiguration config, File[] sourceFiles) protected abstract org.codehaus.plexus.util.cli.CommandlinegetCommandLine(File src, File dest, CompilerConfiguration config) protected static FilegetObjectFile(File sourceFile, File outputDirectory, String objectFileExtension) Figure out the object file relative path from a given source fileprotected static StringgetObjectFileExtension(String fileExtension) return "obj" or "o" when file extension is not given based on current platformprotected abstract ParserMethods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
AbstractCompiler
public AbstractCompiler()
-
-
Method Details
-
getParser
-
getCommandLine
protected abstract org.codehaus.plexus.util.cli.Commandline getCommandLine(File src, File dest, CompilerConfiguration config) throws NativeBuildException - Throws:
NativeBuildException
-
compile
public List<File> compile(CompilerConfiguration config, File[] sourceFiles) throws NativeBuildException - Specified by:
compilein interfaceCompiler- Parameters:
config-sourceFiles-- Returns:
- List of compiler ouput files (ie, .o, .obj )
- Throws:
NativeBuildException
-
getObjectFileExtension
return "obj" or "o" when file extension is not given based on current platform- Returns:
-
getObjectFile
protected static File getObjectFile(File sourceFile, File outputDirectory, String objectFileExtension) throws NativeBuildException Figure out the object file relative path from a given source file- Parameters:
sourceFile-outputDirectory-workingDirectory-config-- Returns:
- Throws:
NativeBuildException
-