Bugs item #1191185, was opened at 2005-04-27 19:34 Message generated for change (Comment added) made by drieseng You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1191185&group_id=31650
>Category: Tasks >Group: 0.85 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Robert Blum (rblum) >Assigned to: Gert Driesen (drieseng) 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; } } ---------------------------------------------------------------------- >Comment By: Gert Driesen (drieseng) Date: 2005-05-04 08:27 Message: Logged In: YES user_id=707851 This is now fixed in cvs. Thanks for the report ! ---------------------------------------------------------------------- Comment By: Robert Blum (rblum) Date: 2005-04-27 20:33 Message: Logged In: YES user_id=25786 Actually, you want to be even more agressive (sorry - learning about Nant internals as I go... :( ) At the top of IsPchfileUpToDate(), after you checked if there even is a PCH, you want to return true if you're just using the PCH - you're not concerned with rebuilding it at that time. // If we just use the PCH, we don't want to rebuild it either if( PchMode == PrecompiledHeaderMode.Use ) { return true; } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1191185&group_id=31650 ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers