terp - the ANT Tasks
v1.3.337

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

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

public class RuntimeOption
extends AbstractCompilerOption<CppCompiler>

The option specifying runtime settings. This option applies to Microsoft and Intel compilers on Windows as well as QNX compilers on all platforms.


Constructor Summary
RuntimeOption()
           
 
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 getFlavor()
          The flavor that is supposed to have a meaning for the target compiler.
 void setDebug(boolean bDebug)
          Specifies that the debug runtime should be used.
 void setDynamic(boolean bDynamic)
          Specifies that the dynamic runtime should be used.
 void setFlavor(java.lang.String flavor)
          Specifies a runtime flavor that has a meaning for one or more compilers.
 void setStatic(boolean bStatic)
          Specifies that the static runtime should be used.
 
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
 

Constructor Detail

RuntimeOption

public RuntimeOption()
Method Detail

setFlavor

public void setFlavor(java.lang.String flavor)
Specifies a runtime flavor that has a meaning for one or more compilers. For example, the qcc compiler distinguishes between abridged C++, embedded C++, ISO C++, GNU C++. The understood values for qcc are:
FlavorValue
Abridged C++abridged, acpp
Embedded C++embedded, ecpp, ec++
C++standard, cpp, iso
GNUgpp, gnu

Parameters:
flavor - the flavor.

getFlavor

public java.lang.String getFlavor()
The flavor that is supposed to have a meaning for the target compiler.

Returns:
a flavor string.

setStatic

public void setStatic(boolean bStatic)
Specifies that the static runtime should be used.

Parameters:
bStatic - true if the static C++ runtime library is to be used.

setDynamic

public void setDynamic(boolean bDynamic)
Specifies that the dynamic runtime should be used.

Parameters:
bDynamic - true if the dynamic C++ runtime is to be used.

setDebug

public void setDebug(boolean bDebug)
Specifies that the debug runtime should be used. This options defaults to the value of the debug option that is in force for the compilation but can be overridden here.

Parameters:
bDebug - true if the debug version of the runtime is to be used.

addCommands

public 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. 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. Only adds a setting on Windows for Microsoft and Intel compilers.

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)
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. Returns true for Microsoft and Intel compilers on Windows.

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.