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()
114
114
}
115
115
}
116
116
117
- if ( Context . Options . SystemModule != null )
117
+ var generateSystemModule = Context . Options . SystemModule != null &&
118
+ Context . Options . GeneratorKind == GeneratorKind . CSharp ;
119
+ if ( generateSystemModule )
118
120
{
119
121
var output = GenerateModule ( Context . Options . SystemModule ) ;
120
122
if ( output != null )
@@ -150,14 +152,18 @@ public virtual GeneratorOutput GenerateUnit(TranslationUnit unit)
150
152
151
153
public virtual GeneratorOutput GenerateModule ( Module module )
152
154
{
155
+ var generatedUnits = module . Units . GetGenerated ( ) . ToList ( ) ;
156
+ if ( generatedUnits . Count == 0 )
157
+ return null ;
158
+
153
159
var output = new GeneratorOutput
154
160
{
155
161
TranslationUnit = new TranslationUnit
156
162
{
157
163
FilePath = $ "{ module . LibraryName } ",
158
164
Module = module
159
165
} ,
160
- Outputs = Generate ( module . Units . GetGenerated ( ) )
166
+ Outputs = Generate ( generatedUnits )
161
167
} ;
162
168
163
169
output . Outputs [ 0 ] . Process ( ) ;
Original file line number Diff line number Diff line change 5
5
6
6
<ItemGroup >
7
7
<Compile Include =" $(GenDir)NamespacesDerived\NamespacesDerived.cs" />
8
- <Compile Include =" $(GenDir)NamespacesDerived\Std.cs" />
9
8
</ItemGroup >
10
9
11
10
<ItemGroup >
You can’t perform that action at this time.
0 commit comments