C# Class NAnt.VisualCpp.Tasks.ClTask

Inheritance: ExternalProgramBase
ファイルを表示 Open project: savornicesei/NAnt2 Class Usage Examples

Private Properties

Property Type Description
AreObjsUpToDate bool
FindUpdatedInclude string
IsObjUpToDate bool
IsPchfileUpToDate bool

Public Methods

Method Description
ClTask ( ) : System

Initializes a new instance of the ClTask class.

GetObjOutputFile ( string srcFile, string objectPath ) : string

Determines the file name of the OBJ file for the specified source file.

QuoteArgumentValue ( string value ) : string

Quotes an argument value and duplicates trailing backslahes.

Protected Methods

Method Description
ExecuteTask ( ) : void

Compiles the sources.

NeedsCompiling ( ) : bool

Determines if the sources need to be compiled.

Private Methods

Method Description
AreObjsUpToDate ( ) : bool
FindUpdatedInclude ( string srcFileName, DateTime objLastWriteTime ) : string

Determines whether any file that are includes in the specified source file has been updated after the obj was compiled.

To determine what includes are defined in a source file, conditional directives are not honored.

If a given include cannot be resolved to an existing file, then it will be considered stable.

IsObjUpToDate ( string srcFileName ) : bool
IsPchfileUpToDate ( ) : bool

Determines whether the precompiled header file is up-to-date.

In order to determine accurately whether the precompile header file is up-to-date, we'd need scan all the header files that are pulled in. As this is not implemented right now, its safer to always recompile.

Method Details

ClTask() public method

Initializes a new instance of the ClTask class.
public ClTask ( ) : System
return System

ExecuteTask() protected method

Compiles the sources.
protected ExecuteTask ( ) : void
return void

GetObjOutputFile() public static method

Determines the file name of the OBJ file for the specified source file.
public static GetObjOutputFile ( string srcFile, string objectPath ) : string
srcFile string The source file for which the OBJ file should be determined.
objectPath string The path of the object file.
return string

NeedsCompiling() protected method

Determines if the sources need to be compiled.
protected NeedsCompiling ( ) : bool
return bool

QuoteArgumentValue() public static method

Quotes an argument value and duplicates trailing backslahes.
public static QuoteArgumentValue ( string value ) : string
value string The argument value to quote.
return string