Răsfoiți Sursa

Hack to stop VS building everything every time.

Steven Kirk 4 ani în urmă
părinte
comite
a246b8533f
1 a modificat fișierele cu 8 adăugiri și 0 ștergeri
  1. 8 0
      src/tools/MicroComGenerator/Program.cs

+ 8 - 0
src/tools/MicroComGenerator/Program.cs

@@ -35,8 +35,16 @@ namespace MicroComGenerator
 
 
             if (opts.CppOutput != null)
             if (opts.CppOutput != null)
                 File.WriteAllText(opts.CppOutput, CppGen.GenerateCpp(ast));
                 File.WriteAllText(opts.CppOutput, CppGen.GenerateCpp(ast));
+            
             if (opts.CSharpOutput != null)
             if (opts.CSharpOutput != null)
+            {
                 File.WriteAllText(opts.CSharpOutput, new CSharpGen(ast).Generate());
                 File.WriteAllText(opts.CSharpOutput, new CSharpGen(ast).Generate());
+                
+                // HACK: Can't work out how to get the VS project system's fast up-to-date checks
+                // to ignore the generated code, so as a workaround set the write time to that of
+                // the input.
+                File.SetLastWriteTime(opts.CSharpOutput, File.GetLastWriteTime(opts.Input));
+            }
             
             
             return 0;
             return 0;
         }
         }