File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,9 @@ public virtual List<GeneratorOutput> Generate()
114114 }
115115 }
116116
117- if ( Context . Options . SystemModule != null )
117+ var generateSystemModule = Context . Options . SystemModule != null &&
118+ Context . Options . GeneratorKind == GeneratorKind . CSharp ;
119+ if ( generateSystemModule )
118120 {
119121 var output = GenerateModule ( Context . Options . SystemModule ) ;
120122 if ( output != null )
@@ -150,14 +152,18 @@ public virtual GeneratorOutput GenerateUnit(TranslationUnit unit)
150152
151153 public virtual GeneratorOutput GenerateModule ( Module module )
152154 {
155+ var generatedUnits = module . Units . GetGenerated ( ) . ToList ( ) ;
156+ if ( generatedUnits . Count == 0 )
157+ return null ;
158+
153159 var output = new GeneratorOutput
154160 {
155161 TranslationUnit = new TranslationUnit
156162 {
157163 FilePath = $ "{ module . LibraryName } ",
158164 Module = module
159165 } ,
160- Outputs = Generate ( module . Units . GetGenerated ( ) )
166+ Outputs = Generate ( generatedUnits )
161167 } ;
162168
163169 output . Outputs [ 0 ] . Process ( ) ;
Original file line number Diff line number Diff line change 55
66 <ItemGroup >
77 <Compile Include =" $(GenDir)NamespacesDerived\NamespacesDerived.cs" />
8- <Compile Include =" $(GenDir)NamespacesDerived\Std.cs" />
98 </ItemGroup >
109
1110 <ItemGroup >
You can’t perform that action at this time.
0 commit comments