1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: Fix file-specific compiler flags

This commit is contained in:
reuk 2023-01-10 12:40:11 +00:00
parent ed3c40c2d1
commit 709c0f7a16
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
3 changed files with 33 additions and 82 deletions

View file

@ -948,20 +948,20 @@ private:
void writeCompilerFlagSchemes (OutputStream& out, const std::vector<std::pair<File, String>>& filesToCompile) const
{
StringArray schemesToWrite;
std::set<String> schemesToWrite;
for (auto& f : filesToCompile)
if (f.second.isNotEmpty())
schemesToWrite.addIfNotAlreadyThere (f.second);
for (const auto& pair : filesToCompile)
if (pair.second.isNotEmpty())
schemesToWrite.insert (pair.second);
if (! schemesToWrite.isEmpty())
{
for (auto& s : schemesToWrite)
out << getCompilerFlagSchemeVariableName (s) << " := "
<< compilerFlagSchemesMap[s].get().toString() << newLine;
if (schemesToWrite.empty())
return;
out << newLine;
}
for (const auto& s : schemesToWrite)
if (const auto flags = getCompilerFlagsForFileCompilerFlagScheme (s); flags.isNotEmpty())
out << getCompilerFlagSchemeVariableName (s) << " := " << flags << newLine;
out << newLine;
}
void writeMakefile (OutputStream& out) const