Bugs item #1191285, was opened at 2005-04-27 15: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=1191285&group_id=31650
Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Robert Blum (rblum) Assigned to: Nobody/Anonymous (nobody) Summary: CL task rebuilds too many files Initial Comment: The update-check for CL is a bit too generous - if *any* of the submitted .cpp files are out of date with respect to their header, *all* of them are rebuilt. This is not a problem were I call [cl] by hand, but the solution task submits batches of files based on configuration groups. If all files share the same build configuration, having a single one of them out of date causes all of them to be rebuilt.. I.e. you have 90 files including foo.h, 1 file including bar.h. All CPP files share same config. Touch bar.h, get 91 compiles (instead of 1) I'm resorting to evil hackery to fix this for now (deadlines and all) In ClTask.cs, add a private member for outdated files: private StringCollection _OutdatedFileNames; Then, in ExecuteTask, use that instead of Sources.Filenames, with some special handling thrown in for PCHs _OutdatedFileNames = new StringCollection(); if (NeedsCompiling()) { // If we need compiling, but Outdate File collection is empty, // it's PCH stuff - mark all files as outdated if( _OutdatedFileNames.Count == 0 ) { Log(Level.Verbose, "PCH out of date, recompiling all."); _OutdatedFileNames = Sources.FileNames; } Log(Level.Info, "Compiling {0} files to '{1}'.", _OutdatedFileNames.Count, OutputDir.FullName); .... lots of ExecuteTask code ... then, building the list of files in ExecuteTask // write each of the filenames //foreach (string filename in Sources.FileNames) { foreach (string filename in _OutdatedFileNames ) { writer.WriteLine(QuoteArgumentValue(filename)); } ... And finally, a modified AreObjsUpToDate that collects all outdated cpp files private bool AreObjsUpToDate() { foreach (string filename in Sources.FileNames) { // if the source file does not exist, then we'll consider it // not up-to-date if (!File.Exists(filename)) { Log(Level.Verbose, "'{0}' does not exist, recompiling.", filename); _OutdatedFileNames.Add( filename ); } if (!IsObjUpToDate(filename)) { _OutdatedFileNames.Add( filename ); } } // If we didn't have any outdated files, the OBJs are up to date return ( _OutdatedFileNames.Count ==0 ); } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1191285&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