3 using SysGen.BuildEngine.Attributes;
4 using SysGen.RBuild.Framework;
6 namespace SysGen.BuildEngine.Tasks
9 /// PreCompiled Header task
12 public class PCHTask : FileTask
15 /// Creates a new instance of the <see cref="PCHTask"/> class.
21 protected override void CreateFileSystemObject()
23 m_FileSystemInfo = new RBuildSourceFile();
26 public RBuildSourceFile SourceFile
28 get { return m_FileSystemInfo as RBuildSourceFile; }
31 protected override void ExecuteTask()
33 if (Module.PreCompiledHeader != null)
34 throw new BuildException("Only one <pch ../> is allowed per module", Location);
39 //Add the folder where the PCH is present as a include folder
40 Module.IncludeFolders.Add(new RBuildFolder(PathRoot.Intermediate, Base));