Bugs item #1191185, was opened at 2005-04-27 12:34
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1191185&group_id=31650

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Robert Blum (rblum)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bad logic for cl task/.pch handling

Initial Comment:
It seems the CL task has some logic for PCH handling
that's inverted.

It checks if any of the sources are newer than the .PCH
file, and if so, recompiles them. However, .cpp files
will hopefully almost always be newer than the .pch -
at least we edit and recompile them quite frequently
without ever touching the precompiled header.

As a result, if you edit any .cpp file after the .pch
is created, it will be recompiled every time you
execute nant. 

I assume what you wanted to check is if the *PCH*
source file is newer than the .PCH, and if so, rebuild. 

I have a temporary fix in, but I'm not sure if that's
entirely right. It works for setups where you have all
files set to "Use PCH" except one that's set to "Create
PCH". I have not tried it with AutoGenerated PCHs.
(Sorry, not enough time...)


At line 472, replace 

            // check if sources fresher than pch file
            string fileName =
FileSet.FindMoreRecentLastWriteTime(Sources.FileNames,
pchFileInfo.LastWriteTime);
            if (fileName != null) {
                Log(Level.Verbose, "'{0}' is newer than
pch file, recompiling.", 
                    fileName);
                return false;
            }


with 

            string fileName;
                        if( PchMode != PrecompiledHeaderMode.Use ) {
                                fileName =
FileSet.FindMoreRecentLastWriteTime(Sources.FileNames,
pchFileInfo.LastWriteTime);
                                if (fileName != null) 
                                {
                                        Log(Level.Verbose, "'{0}' is newer than 
pch file,
recompiling.", 
                                                fileName);
                                        return false;
                                }
                        }



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1191185&group_id=31650


-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to