@@ -125,41 +125,46 @@ std::vector<std::string> Generator::Build() const noexcept
125
125
{
126
126
std::vector<std::string> builtFiles;
127
127
128
- if (outputSharedTypesHeader () && _options.verbose )
129
- {
130
- builtFiles.push_back (_sharedTypesHeaderPath);
131
- }
128
+ if (!_options.noTypes ){
129
+ if (outputSharedTypesHeader () && _options.verbose )
130
+ {
131
+ builtFiles.push_back (_sharedTypesHeaderPath);
132
+ }
132
133
133
- if (outputSharedTypesModule () && _options.verbose )
134
- {
135
- builtFiles.push_back (_sharedTypesModulePath);
136
- }
134
+ if (outputSharedTypesModule () && _options.verbose )
135
+ {
136
+ builtFiles.push_back (_sharedTypesModulePath);
137
+ }
137
138
138
- if (outputSchemaHeader () && _options.verbose )
139
- {
140
- builtFiles.push_back (_schemaHeaderPath);
139
+ if (outputSharedTypesSource ())
140
+ {
141
+ builtFiles.push_back (_sharedTypesSourcePath);
142
+ }
141
143
}
142
144
143
- if (outputSchemaModule () && _options.verbose )
144
- {
145
- builtFiles.push_back (_schemaModulePath);
146
- }
147
145
148
- if (outputSharedTypesSource ())
149
- {
150
- builtFiles.push_back (_sharedTypesSourcePath);
151
- }
146
+ if (!_options.noSchema ){
147
+ if (outputSchemaHeader () && _options.verbose )
148
+ {
149
+ builtFiles.push_back (_schemaHeaderPath);
150
+ }
152
151
153
- if (outputSchemaSource () )
154
- {
155
- builtFiles.push_back (_schemaSourcePath );
156
- }
152
+ if (outputSchemaModule () && _options. verbose )
153
+ {
154
+ builtFiles.push_back (_schemaModulePath );
155
+ }
157
156
158
- auto separateFiles = outputSeparateFiles ();
157
+ if (outputSchemaSource ())
158
+ {
159
+ builtFiles.push_back (_schemaSourcePath);
160
+ }
159
161
160
- for (auto & file : separateFiles)
161
- {
162
- builtFiles.push_back (std::move (file));
162
+ auto separateFiles = outputSeparateFiles ();
163
+
164
+ for (auto & file : separateFiles)
165
+ {
166
+ builtFiles.push_back (std::move (file));
167
+ }
163
168
}
164
169
165
170
return builtFiles;
@@ -3821,6 +3826,8 @@ int main(int argc, char** argv)
3821
3826
bool stubs = false ;
3822
3827
bool noIntrospection = false ;
3823
3828
bool prefixedHeaders = false ;
3829
+ bool noTypes = false ;
3830
+ bool noSchema = false ;
3824
3831
std::string schemaFileName;
3825
3832
std::string filenamePrefix;
3826
3833
std::string schemaNamespace;
@@ -3847,7 +3854,11 @@ int main(int argc, char** argv)
3847
3854
" Unimplemented fields throw runtime exceptions instead of compiler errors" )(" no-"
3848
3855
" introspection" ,
3849
3856
po::bool_switch (&noIntrospection),
3850
- " Do not generate support for Introspection" )(" prefix-headers" ,
3857
+ " Do not generate support for Introspection" )(" no-types" ,
3858
+ po::bool_switch (&noTypes),
3859
+ " Do not generate SharedTypes" )(" no-schema" ,
3860
+ po::bool_switch (&noSchema),
3861
+ " Do not generate Schema" )(" prefix-headers" ,
3851
3862
po::bool_switch (&prefixedHeaders),
3852
3863
" Prefix generated object header filenames" );
3853
3864
positional.add (" schema" , 1 ).add (" prefix" , 1 ).add (" namespace" , 1 );
@@ -3914,6 +3925,8 @@ int main(int argc, char** argv)
3914
3925
verbose, // verbose
3915
3926
stubs, // stubs
3916
3927
noIntrospection, // noIntrospection
3928
+ noTypes, // noTypes
3929
+ noSchema, // noSchema
3917
3930
prefixedHeaders, // prefixedHeaders
3918
3931
})
3919
3932
.Build ();
0 commit comments