diff options
Diffstat (limited to 'cli/generator.cxx')
-rw-r--r-- | cli/generator.cxx | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/cli/generator.cxx b/cli/generator.cxx index 01f77d5..3a0a55b 100644 --- a/cli/generator.cxx +++ b/cli/generator.cxx @@ -204,13 +204,20 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p) // have to include in the generated header file, we will still // need to generate some template code in the source file. // - bool runtime (true); - for (semantics::cli_unit::includes_iterator i (unit.includes_begin ()); - runtime && i != unit.includes_end (); - ++i) + bool runtime (!ops.suppress_cli ()); + + if (runtime) { - if (i->is_a<semantics::cli_includes> ()) - runtime = false; + for (semantics::cli_unit::includes_iterator i (unit.includes_begin ()); + i != unit.includes_end (); + ++i) + { + if (i->is_a<semantics::cli_includes> ()) + { + runtime = false; + break; + } + } } // @@ -391,7 +398,8 @@ generate (options const& ops, semantics::cli_unit& unit, path const& p) if (runtime && !inl) generate_runtime_inline (ctx); - generate_runtime_source (ctx, runtime); + if (!ops.suppress_cli ()) + generate_runtime_source (ctx, runtime); if (!inl) generate_inline (ctx); |