Skip to content
Open
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
44 changes: 22 additions & 22 deletions extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h
Original file line number Diff line number Diff line change
Expand Up @@ -1350,36 +1350,36 @@ class MSVCProjectExporterBase : public ProjectExporter

auto& config = *static_cast<const MSVCBuildConfiguration*> (&*i);

for (const auto& arch : config.getArchitectures())
{
auto pchFileContent = config.getPrecompiledHeaderFileContent();
auto pchFileContent = config.getPrecompiledHeaderFileContent();

if (pchFileContent.isEmpty())
continue;
if (pchFileContent.isEmpty())
continue;

auto pchFile = owner.getTargetFolder().getChildFile (config.getPrecompiledHeaderFilename()).withFileExtension (".h");
auto pchFile = owner.getTargetFolder().getChildFile (config.getPrecompiledHeaderFilename()).withFileExtension (".h");

build_tools::writeStreamToFile (pchFile, [&] (MemoryOutputStream& mo)
{
mo << pchFileContent;
});
build_tools::writeStreamToFile (pchFile, [&] (MemoryOutputStream& mo)
{
mo << pchFileContent;
});

auto pchSourceFile = pchFile.withFileExtension (".cpp");
auto pchSourceFile = pchFile.withFileExtension (".cpp");

build_tools::writeStreamToFile (pchSourceFile, [this] (MemoryOutputStream& mo)
{
mo.setNewLineString (owner.getNewLineString());
build_tools::writeStreamToFile (pchSourceFile, [this] (MemoryOutputStream& mo)
{
mo.setNewLineString (owner.getNewLineString());
writeAutoGenWarningComment (mo);

writeAutoGenWarningComment (mo);
mo << " This is an empty source file generated by JUCE required for Visual Studio PCH." << newLine
<< newLine
<< "*/" << newLine
<< newLine;
});

mo << " This is an empty source file generated by JUCE required for Visual Studio PCH." << newLine
<< newLine
<< "*/" << newLine
<< newLine;
});
auto* pchSourceElement = cpps.createNewChildElement ("ClCompile");
pchSourceElement->setAttribute ("Include", prependDot (pchSourceFile.getFileName()));

auto* pchSourceElement = cpps.createNewChildElement ("ClCompile");
pchSourceElement->setAttribute ("Include", prependDot (pchSourceFile.getFileName()));
for (const auto& arch : config.getArchitectures())
{
setSourceFilePCHSettings (*pchSourceElement, pchFile, "Create", config, arch);
}
}
Expand Down