|
terp - the ANT Tasks v1.3.304 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.codemesh.terp.ant.compiler.AbstractCompilerOption<CppCompiler>
com.codemesh.terp.ant.compiler.cpp.TargetOption
public class TargetOption
Specifies the target of the C++ compilation. This is one of the key options of every compilation. With this option you specify:
<target name="math"
type="shared"
version="${lib.version}"
>
If lib.version is set to 1.0.5 this will result in:
| Field Summary | |
|---|---|
static java.lang.String |
CONSOLE
|
static java.lang.String |
WINDOWS
|
| Constructor Summary | |
|---|---|
TargetOption()
|
|
| Method Summary | |
|---|---|
void |
addCommands(java.util.List<java.lang.String> commandList,
CppCompiler compiler,
CompilerPhase phase)
Adds the compiler switches repreesnted by this option to the list of switches. |
boolean |
appliesTo(CppCompiler compiler,
CompilerPhase phase)
Returns true if this compiler option applies to the given compiler and compiler phase. |
java.util.List<java.lang.String[]> |
calculateLinks(CppCompiler compiler)
Returns a list of name pairs. |
protected java.io.File |
calculateTargetFile(CppCompiler compiler)
Returns the primary target file. |
java.util.List<java.lang.String> |
creates(CppCompiler compiler,
CompilerPhase phase)
Returns a list of filenames representing the files that are created due to the presence of this compiler option. |
java.lang.String |
getImplib()
Returns the .LIB filename. |
java.lang.String |
getInstallName()
Returns the MacOS X-specific install name. |
java.lang.String |
getMakeLinks()
Returns the configured value deciding whether or not to generate dynamic links for versioned libraries. |
java.lang.String |
getName()
Returns the configured target basename. |
java.lang.String |
getSubsystem()
Returns the Windows subsystem. |
TargetType |
getType()
Returns the target type of the compiler invocation. |
java.lang.String |
getVersion()
Returns the configured version number. |
void |
setImplib(java.lang.String implib)
The name of the .LIB file on Windows (when building shared libraries). |
void |
setInstallName(java.lang.String name)
A MacOS X-specific option that allows specification of an installname. |
void |
setMakeLinks(java.lang.String makeLinks)
Specify true or false to decide whether to generate dynamic links for versioned libraries. |
void |
setName(java.lang.String name)
Sets the target name. |
void |
setSubsystem(java.lang.String subsystem)
Returns the subsystem being built. |
void |
setType(java.lang.String type)
Sets the target type. |
void |
setVersion(java.lang.String version)
Sets the file version. |
| Methods inherited from class com.codemesh.terp.ant.compiler.AbstractCompilerOption |
|---|
expand, expand, getIf, getProject, getUnless, quoteIfNecessary, satisfies, setIf, setProject, setUnless |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.codemesh.terp.ant.compiler.CompilerOption |
|---|
getIf, getUnless, satisfies, setIf, setUnless |
| Field Detail |
|---|
public static final java.lang.String CONSOLE
public static final java.lang.String WINDOWS
| Constructor Detail |
|---|
public TargetOption()
| Method Detail |
|---|
public void setType(java.lang.String type)
type - the type string.public TargetType getType()
public void setSubsystem(java.lang.String subsystem)
The default value is "console".
subsystem - the subsystem identifier.public java.lang.String getSubsystem()
public void setImplib(java.lang.String implib)
implib - the name of the .LIB file on Windows.public java.lang.String getImplib()
public void setName(java.lang.String name)
For example: to build a shared library called foo.dll on Windows and libfoo.so.1.2.3 on Solaris, just specify name="foo". The version number will be appended automatically if you also set version="1.2.3".
name - the basename of the target file.public java.lang.String getName()
public void setInstallName(java.lang.String name)
name - the installname.public java.lang.String getInstallName()
public void setVersion(java.lang.String version)
Specifying a version is optional.
version - the target version.public java.lang.String getVersion()
public void setMakeLinks(java.lang.String makeLinks)
makeLinks - true or false.public java.lang.String getMakeLinks()
public void addCommands(java.util.List<java.lang.String> commandList,
CppCompiler compiler,
CompilerPhase phase)
This method is called by the compiler repeatedly with different values for the compiler phase to account for these possibilities.
addCommands in interface CompilerOption<CppCompiler>commandList - the list to which the compiler switches represented
by this option (if any) are added.compiler - the compiler for which we're doing this.phase - the compiler phase in wihch we're doing this.public java.util.List<java.lang.String[]> calculateLinks(CppCompiler compiler)
compiler - the compiler.
protected java.io.File calculateTargetFile(CppCompiler compiler)
For example, when building a shared library on Windows, the primary target file is a DLL (not a LIB). When building a versioned shared object on Unix, the primary target file is a file with version number appended to the name, for example libfoo.so.1.2.3. Based on other attributes, the compiler might generate additional files (.LIB files or version aliases) but they are irrelevant as far as this function is concerned.
compiler - the compiler.
public boolean appliesTo(CppCompiler compiler,
CompilerPhase phase)
appliesTo in interface CompilerOption<CppCompiler>compiler - the compiler for which we're asking.phase - the compiler phase we're executing.
public java.util.List<java.lang.String> creates(CppCompiler compiler,
CompilerPhase phase)
creates in interface FileCreating<CppCompiler>compiler - the compiler.phase - the compilation phase.
|
terp - the ANT Tasks v1.3.304 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||