Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions cppwinrt/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace cppwinrt
{ "include", 0, option::no_max, "<prefix>", "One or more prefixes to include in input" },
{ "exclude", 0, option::no_max, "<prefix>", "One or more prefixes to exclude from input" },
{ "base", 0, 0, {}, "Generate base.h unconditionally" },
{ "modules", 0, 0, {}, "Generate namespace modules; disables winrt.ixx and PCH" },
{ "modules", 0, 0, {}, "Generate C++ modules (ixx) for each namespaces" },
{ "optimize", 0, 0, {}, "Generate component projection with unified construction support" },
{ "help", 0, option::no_max, {}, "Show detailed help with examples" },
{ "?", 0, option::no_max, {}, {} },
Expand Down Expand Up @@ -619,15 +619,8 @@ R"( local Local ^%WinDir^%\System32\WinMetadata folder
task_group group;
group.synchronous(args.exists("synchronous"));
std::map<std::string, std::vector<std::string>> module_imports;
writer ixx;
if (!settings.modules)
{
write_preamble(ixx);
ixx.write("module;\n");
ixx.write(strings::base_includes);
ixx.write("\nexport module winrt;\n#define WINRT_EXPORT export\n\n");
}
else

if (settings.modules)
{
write_numerics_ixx();
write_base_ixx();
Expand All @@ -640,11 +633,6 @@ R"( local Local ^%WinDir^%\System32\WinMetadata folder
continue;
}

if (!settings.modules)
{
ixx.write("#include \"winrt/%.h\"\n", ns);
}

group.add([&, &ns = ns, &members = members]
{
if (settings.modules)
Expand Down Expand Up @@ -680,10 +668,6 @@ R"( local Local ^%WinDir^%\System32\WinMetadata folder
write_module_h();
}
write_base_h();
if (!settings.modules)
{
ixx.flush_to_file(settings.output_folder + "winrt/winrt.ixx");
}
}

if (settings.component)
Expand Down