|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.Task | +--net.sf.antcontrib.cpptasks.CCTask
Compile and link task.
This task can compile various source languages and produce executables, shared libraries (aka DLL's) and static libraries. Compiler adaptors are currently available for several C/C++ compilers, FORTRAN, MIDL and Windows Resource files.
Copyright (c) 2001, 2002, Ant-Contrib project.
Licensed under the Apache Software License 1.1, http://www.apache.org/LICENSE.
For use with Jakarta Ant 1.5 or later. This software is not a product of the of the Apache Software Foundation and no endorsement is implied.
THIS SOFTWARE IS PROVIDED 'AS-IS', See http://www.apache.org/LICENSE for additional disclaimers.
To use:
Inner Class Summary | |
static class |
CCTask.RuntimeType
Enumerated attribute with the values "dynamic" and "static", |
Fields inherited from class org.apache.tools.ant.Task |
description,
location,
target,
taskName,
taskType,
wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
CCTask()
|
Method Summary | |
void |
addConfiguredCompiler(CompilerDef compiler)
Adds a compiler definition or reference. |
void |
addConfiguredCompilerArg(CompilerArgument arg)
Adds a compiler command-line arg. |
void |
addConfiguredDefineset(DefineSet defs)
Adds a defineset. |
void |
addConfiguredLinker(LinkerDef linker)
Adds a linker definition. |
void |
addConfiguredLinkerArg(LinkerArgument arg)
Adds a linker command-line arg. |
void |
addFileset(ConditionalFileSet srcSet)
Adds a source file set. |
void |
addLibset(LibrarySet libset)
Adds a library set. |
void |
addSyslibset(SystemLibrarySet libset)
Adds a system library set. |
protected int |
checkForChangedIncludeFiles(java.util.Hashtable targets)
Checks all targets that are not forced to be rebuilt or are missing object files to be checked for modified include files |
protected LinkerConfiguration |
collectExplicitObjectFiles(java.util.Vector objectFiles,
java.util.Vector sysObjectFiles)
|
IncludePath |
createIncludePath()
Adds an include path. |
PrecompileDef |
createPrecompile()
Specifies precompilation prototype file and exclusions. |
SystemIncludePath |
createSysIncludePath()
Adds a system include path. |
void |
execute()
Executes the task. |
java.lang.String |
getDataset()
Gets the dataset. |
protected TargetHistoryTable |
getLinkHistory(TargetHistoryTable objHistory)
|
protected TargetInfo |
getLinkTarget(LinkerConfiguration linkerConfig,
java.util.Vector objectFiles,
java.util.Vector sysObjectFiles,
java.util.Hashtable compileTargets)
|
java.io.File |
getObjdir()
|
java.io.File |
getOutfile()
|
static java.util.Hashtable |
getTargetsToBuildByConfiguration(java.util.Hashtable targets)
Builds a Hashtable to targets needing to be rebuilt keyed by compiler configuration |
void |
setClassname(java.lang.String classname)
Sets the default compiler adapter. |
void |
setDataset(java.lang.String dataset)
Sets the dataset for OS/390 builds. |
void |
setDebug(boolean debug)
Enables or disables generation of debug info. |
void |
setDependencyDepth(int depth)
Deprecated. |
void |
setExceptions(boolean exceptions)
Enables generation of exception handling code |
void |
setIncremental(boolean incremental)
Enables or disables incremental linking. |
void |
setLibtool(boolean libtool)
Set use of libtool. |
void |
setLink(OutputTypeEnum outputType)
Deprecated. |
void |
setMultithreaded(boolean multi)
Enables or disables generation of multithreaded code |
void |
setName(CompilerEnum name)
Sets type of the default compiler and linker. |
void |
setObjdir(java.io.File dir)
Sets the destination directory for object files. |
void |
setOutfile(java.io.File outfile)
Sets the output file name. |
void |
setOuttype(OutputTypeEnum outputType)
Sets the output file type. |
void |
setProject(org.apache.tools.ant.Project project)
Sets the project. |
void |
setRebuild(boolean rebuildAll)
If set to true, all files will be rebuilt. |
void |
setRelentless(boolean relentless)
If set to true, compilation errors will not stop the task until all files have been attempted. |
void |
setRuntime(CCTask.RuntimeType rtlType)
Sets the type of runtime library, possible values "dynamic", "static". |
void |
setSubsystem(SubsystemEnum subsystem)
Sets the nature of the subsystem under which that the program will execute. |
void |
setWarnings(CompilerDef.WarningLevel level)
Enumerated attribute with the values "none", "severe", "default", "production", "diagnostic", and "failtask". |
Methods inherited from class org.apache.tools.ant.Task |
getDescription,
getLocation,
getOwningTarget,
getRuntimeConfigurableWrapper,
getTaskName,
handleErrorOutput,
handleOutput,
init,
isInvalid,
log,
log,
maybeConfigure,
perform,
setDescription,
setLocation,
setOwningTarget,
setRuntimeConfigurableWrapper,
setTaskName |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public CCTask()
Method Detail |
public void setObjdir(java.io.File dir)
public java.io.File getObjdir()
public void setProject(org.apache.tools.ant.Project project)
public void addFileset(ConditionalFileSet srcSet)
public IncludePath createIncludePath()
public SystemIncludePath createSysIncludePath()
public void addConfiguredCompiler(CompilerDef compiler)
compiler
- compilerpublic void addConfiguredLinker(LinkerDef linker)
linker
- linkerpublic void setDebug(boolean debug)
public void setLibtool(boolean libtool)
libtool
- If true, use libtool.public void setMultithreaded(boolean multi)
multi
- If true, generated code may be multithreaded.public void setExceptions(boolean exceptions)
public void setRebuild(boolean rebuildAll)
public void setDependencyDepth(int depth)
public PrecompileDef createPrecompile() throws org.apache.tools.ant.BuildException
public void setLink(OutputTypeEnum outputType)
public void setOuttype(OutputTypeEnum outputType)
public void addConfiguredCompilerArg(CompilerArgument arg)
public void addConfiguredLinkerArg(LinkerArgument arg)
public void addConfiguredDefineset(DefineSet defs)
defs
- Define setpublic void setOutfile(java.io.File outfile)
outfile
- output file namepublic java.io.File getOutfile()
public void setSubsystem(SubsystemEnum subsystem)
gui | Graphical User Interface |
console | Command Line Console |
other | Other |
subsystem
- subsystempublic void addSyslibset(SystemLibrarySet libset)
libset
- library setpublic void addLibset(LibrarySet libset)
libset
- library setpublic void setRelentless(boolean relentless)
relentless
- If true, don't stop on the first compilation errorpublic void setName(CompilerEnum name)
gcc (default) | GCC C++ compiler |
g++ | GCC C++ compiler |
c++ | GCC C++ compiler |
msvc | Microsoft Visual C++ |
bcc | Borland C++ Compiler |
msrc | Microsoft Resource Compiler |
brc | Borland Resource Compiler |
df | Compaq Visual Fortran Compiler |
midl | Microsoft MIDL Compiler |
icl | Intel C++ compiler for Windows (IA-32) |
ecl | Intel C++ compiler for Windows (IA-64) |
icc | Intel C++ compiler for Linux (IA-32) |
ecc | Intel C++ compiler for Linux (IA-64) |
CC | Sun ONE C++ compiler |
aCC | HP aC++ C++ Compiler |
os390 | OS390 C Compiler |
os400 | Icc Compiler |
sunc89 | Sun C89 C Compiler |
xlC | VisualAge C Compiler |
public void setClassname(java.lang.String classname)
classname
- fully qualified classname which implements CompilerAdapterpublic static java.util.Hashtable getTargetsToBuildByConfiguration(java.util.Hashtable targets)
public void execute() throws org.apache.tools.ant.BuildException
protected LinkerConfiguration collectExplicitObjectFiles(java.util.Vector objectFiles, java.util.Vector sysObjectFiles)
protected TargetInfo getLinkTarget(LinkerConfiguration linkerConfig, java.util.Vector objectFiles, java.util.Vector sysObjectFiles, java.util.Hashtable compileTargets)
protected TargetHistoryTable getLinkHistory(TargetHistoryTable objHistory)
protected int checkForChangedIncludeFiles(java.util.Hashtable targets)
public void setWarnings(CompilerDef.WarningLevel level)
public void setRuntime(CCTask.RuntimeType rtlType)
public void setIncremental(boolean incremental)
incremental
- new statepublic java.lang.String getDataset()
public void setDataset(java.lang.String dataset)
dataset
- The dataset to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |