net.sf.antcontrib.cpptasks

Class CompilerDef

public final class CompilerDef extends ProcessorDef

A compiler definition. compiler elements may be placed either as children of a cc element or the project element. A compiler element with an id attribute may be referenced from compiler elements with refid or extends attributes.

Author: Adam Murdoch

Constructor Summary
CompilerDef()
Method Summary
voidaddConfiguredCompilerArg(CompilerArgument arg)
Adds a compiler command-line arg.
voidaddConfiguredCompilerParam(CompilerParam param)
Adds a compiler command-line arg.
voidaddConfiguredDefineset(DefineSet defs)
Adds a defineset.
IncludePathcreateIncludePath()
Creates an include path.
PrecompileDefcreatePrecompile()
Specifies precompilation prototype file and exclusions.
SystemIncludePathcreateSysIncludePath()
Creates a system include path.
voidexecute()
UndefineArgument[]getActiveDefines()
String[]getActiveIncludePaths()
Returns the compiler-specific include path.
PrecompileDefgetActivePrecompile(CompilerDef ccElement)
String[]getActiveSysIncludePaths()
booleangetExceptions(CompilerDef[] defaultProviders, int index)
booleangetMultithreaded(CompilerDef[] defaultProviders, int index)
OptimizationEnumgetOptimization(CompilerDef[] defaultProviders, int index)
ProcessorgetProcessor()
BooleangetRtti(CompilerDef[] defaultProviders, int index)
intgetWarnings(CompilerDef[] defaultProviders, int index)
voidsetClassname(String classname)
Sets the default compiler adapter.
voidsetExceptions(boolean exceptions)
Enables or disables exception support.
voidsetMultithreaded(boolean multithreaded)
Enables or disables generation of multithreaded code.
voidsetName(CompilerEnum name)
Sets compiler type.
voidsetOptimize(OptimizationEnum value)
Sets optimization level.
protected voidsetProcessor(Processor proc)
voidsetRtti(boolean rtti)
Enables or disables run-time type information.
voidsetWarnings(WarningLevelEnum level)
Enumerated attribute with the values "none", "severe", "default", "production", "diagnostic", and "aserror".

Constructor Detail

CompilerDef

public CompilerDef()

Method Detail

addConfiguredCompilerArg

public void addConfiguredCompilerArg(CompilerArgument arg)
Adds a compiler command-line arg.

addConfiguredCompilerParam

public void addConfiguredCompilerParam(CompilerParam param)
Adds a compiler command-line arg.

addConfiguredDefineset

public void addConfiguredDefineset(DefineSet defs)
Adds a defineset.

createIncludePath

public IncludePath createIncludePath()
Creates an include path.

createPrecompile

public PrecompileDef createPrecompile()
Specifies precompilation prototype file and exclusions.

createSysIncludePath

public SystemIncludePath createSysIncludePath()
Creates a system include path. Locations and timestamps of files located using the system include paths are not used in dependency analysis. Standard include locations should not be specified. The compiler adapters should recognized the settings from the appropriate environment variables or configuration files.

execute

public void execute()

getActiveDefines

public UndefineArgument[] getActiveDefines()

getActiveIncludePaths

public String[] getActiveIncludePaths()
Returns the compiler-specific include path.

getActivePrecompile

public PrecompileDef getActivePrecompile(CompilerDef ccElement)

getActiveSysIncludePaths

public String[] getActiveSysIncludePaths()

getExceptions

public final boolean getExceptions(CompilerDef[] defaultProviders, int index)

getMultithreaded

public boolean getMultithreaded(CompilerDef[] defaultProviders, int index)

getOptimization

public final OptimizationEnum getOptimization(CompilerDef[] defaultProviders, int index)

getProcessor

public Processor getProcessor()

getRtti

public final Boolean getRtti(CompilerDef[] defaultProviders, int index)

getWarnings

public int getWarnings(CompilerDef[] defaultProviders, int index)

setClassname

public void setClassname(String classname)
Sets the default compiler adapter. Use the "name" attribute when the compiler is a supported compiler.

Parameters: classname fully qualified classname which implements CompilerAdapter

setExceptions

public void setExceptions(boolean exceptions)
Enables or disables exception support.

Parameters: exceptions if true, exceptions are supported.

setMultithreaded

public void setMultithreaded(boolean multithreaded)
Enables or disables generation of multithreaded code. Unless specified, multithreaded code generation is enabled.

Parameters: multithreaded If true, generated code may be multithreaded.

setName

public void setName(CompilerEnum name)
Sets compiler type. Supported compilers
gcc (default) GCC C++ compiler
g++ GCC C++ compiler
c++ GCC C++ compiler
g77 GNU Fortran 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
uic Qt user interface compiler
moc Qt meta-object compiler
wcl OpenWatcom C/C++ compiler
wfl OpenWatcom FORTRAN compiler

setOptimize

public void setOptimize(OptimizationEnum value)
Sets optimization level.

Parameters: value optimization level

setProcessor

protected void setProcessor(Processor proc)

setRtti

public void setRtti(boolean rtti)
Enables or disables run-time type information.

Parameters: rtti if true, run-time type information is supported.

setWarnings

public void setWarnings(WarningLevelEnum level)
Enumerated attribute with the values "none", "severe", "default", "production", "diagnostic", and "aserror".
Copyright ? 2001-2011 Ant-Contrib project. All Rights Reserved.