diff --git a/src/Generator/Generators/CLI/CLIHelpers.cs b/src/Generator/Generators/CLI/CLIHelpers.cs index 05fe2624..9610576d 100644 --- a/src/Generator/Generators/CLI/CLIHelpers.cs +++ b/src/Generator/Generators/CLI/CLIHelpers.cs @@ -405,6 +405,7 @@ namespace Cxxi.Generators.CLI public void GenerateStart() { if( Transform == null) +<<<<<<< HEAD { WriteLine("//----------------------------------------------------------------------------"); WriteLine("// This is autogenerated code by cxxi-generator."); @@ -414,6 +415,17 @@ namespace Cxxi.Generators.CLI if( FileExtension == "cpp" ) WriteLine(@"#include ""interop.h"" // marshalString"); +======= + { + WriteLine("//----------------------------------------------------------------------------"); + WriteLine("// This is autogenerated code by cxxi-generator."); + WriteLine("// Do not edit this file or all your changes will be lost after re-generation."); + WriteLine("//----------------------------------------------------------------------------"); + + if( FileExtension == "cpp" ) + WriteLine(@"#include ""../interop.h"" // marshalString"); + +>>>>>>> 02a2243... Add _wrapper suffix to autogenerated files, so would not conflict with normal headers/sources. }else Transform.GenerateStart(this); } @@ -534,9 +546,11 @@ namespace Cxxi.Generators.CLI return template; } + public static String WrapperSuffix = "_wrapper"; + void WriteTemplate(TextTemplate template) { - var file = Path.GetFileNameWithoutExtension(template.Module.FileName) + "." + var file = Path.GetFileNameWithoutExtension(template.Module.FileName) + WrapperSuffix + "." + template.FileExtension; var path = Path.Combine(Options.OutputDir, file); diff --git a/src/Generator/Generators/CLI/CLISourcesTemplate.cs b/src/Generator/Generators/CLI/CLISourcesTemplate.cs index 110162b6..a05c4257 100644 --- a/src/Generator/Generators/CLI/CLISourcesTemplate.cs +++ b/src/Generator/Generators/CLI/CLISourcesTemplate.cs @@ -12,8 +12,15 @@ namespace Cxxi.Generators.CLI { GenerateStart(); +<<<<<<< HEAD WriteLine("#include \"{0}.h\"", Path.GetFileNameWithoutExtension(Module.FileName)); +======= + WriteLine("#include \"{0}{1}.h\"", + Path.GetFileNameWithoutExtension(Module.FileName), + CLIGenerator.WrapperSuffix ); + NewLine(); +>>>>>>> 02a2243... Add _wrapper suffix to autogenerated files, so would not conflict with normal headers/sources. GenerateForwardReferenceHeaders(); NewLine();