terp - the ANT Tasks
v1.3.337

com.codemesh.terp.ant.compiler.cpp
Class RunpathOption

java.lang.Object
  extended by com.codemesh.terp.ant.compiler.AbstractCompilerOption<CppCompiler>
      extended by com.codemesh.terp.ant.compiler.cpp.RunpathOption
All Implemented Interfaces:
CompilerOption<CppCompiler>

public class RunpathOption
extends AbstractCompilerOption<CppCompiler>

An option around the concept of a Unix runpath. The runpath is an embedded search path for libraries.


Field Summary
 java.lang.String environment
           
 java.lang.String linktime
           
 java.lang.String path
           
 
Constructor Summary
RunpathOption()
           
 
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.lang.String getEnvironment()
           
 java.lang.String getLinktime()
           
 java.lang.String getPath()
           
 void setEnvironment(java.lang.String environment)
          Add the environment-specified library path if true on HP-UX.
 void setLinktime(java.lang.String linktime)
          Add the link time runpath if true, remove it if false.
 void setPath(java.lang.String path)
          Set the runpath.
 
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
 

Field Detail

path

public java.lang.String path

linktime

public java.lang.String linktime

environment

public java.lang.String environment
Constructor Detail

RunpathOption

public RunpathOption()
Method Detail

getPath

public java.lang.String getPath()

setPath

public void setPath(java.lang.String path)
Set the runpath.

Parameters:
path - the runpath.

getLinktime

public java.lang.String getLinktime()

setLinktime

public void setLinktime(java.lang.String linktime)
Add the link time runpath if true, remove it if false. The default value is to add the link time library path.

Parameters:
linktime - a boolean expression.

getEnvironment

public java.lang.String getEnvironment()

setEnvironment

public void setEnvironment(java.lang.String environment)
Add the environment-specified library path if true on HP-UX.

Parameters:
environment - a boolean expression.

addCommands

public void addCommands(java.util.List<java.lang.String> commandList,
                        CppCompiler compiler,
                        CompilerPhase phase)
Description copied from interface: CompilerOption
Adds the compiler switches repreesnted by this option to the list of switches. Some compiler options may result in more than one switch being added to a compiler invocation. Other compiler options may result in different options being added in different phases (compilation vs. linking) of the build.

This method is called by the compiler repeatedly with different values for the compiler phase to account for these possibilities.

Parameters:
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.

appliesTo

public boolean appliesTo(CppCompiler compiler,
                         CompilerPhase phase)
Description copied from interface: CompilerOption
Returns true if this compiler option applies to the given compiler and compiler phase. Not every option has switches to contribute for every compiler and every compilation phase. This method allows a quick, inexpensive check to filter out potentially more expensive calls later on.

Parameters:
compiler - the compiler for which we're asking.
phase - the compiler phase we're executing.
Returns:

terp - the ANT Tasks
v1.3.337

Copyright © 2008-2016 by Codemesh, Inc. All Rights Reserved.