mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Separate C and C++ recommended warning flags
This commit is contained in:
parent
46ea879739
commit
8cc0d12fb3
16 changed files with 135 additions and 76 deletions
|
|
@ -604,7 +604,7 @@ private:
|
|||
if (config.isLinkTimeOptimisationEnabled())
|
||||
result.add ("-flto");
|
||||
|
||||
for (auto& recommended : config.getRecommendedCompilerWarningFlags())
|
||||
for (auto& recommended : config.getRecommendedCompilerWarningFlags().common)
|
||||
result.add (recommended);
|
||||
|
||||
auto extra = replacePreprocessorTokens (config, getExtraCompilerFlagsString()).trim();
|
||||
|
|
@ -615,18 +615,19 @@ private:
|
|||
return result;
|
||||
}
|
||||
|
||||
StringArray getCXXFlags() const
|
||||
StringArray getCXXFlags (const BuildConfiguration& config) const
|
||||
{
|
||||
StringArray result;
|
||||
|
||||
for (auto& recommended : config.getRecommendedCompilerWarningFlags().cpp)
|
||||
result.add (recommended);
|
||||
|
||||
auto cppStandard = project.getCppStandardString();
|
||||
|
||||
if (cppStandard == "latest")
|
||||
cppStandard = "17";
|
||||
|
||||
cppStandard = "-std=" + String (shouldUseGNUExtensions() ? "gnu++" : "c++") + cppStandard;
|
||||
|
||||
result.add (cppStandard);
|
||||
result.add ("-std=" + String (shouldUseGNUExtensions() ? "gnu++" : "c++") + cppStandard);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -835,7 +836,7 @@ private:
|
|||
|
||||
out << " JUCE_CXXFLAGS += $(JUCE_CFLAGS)";
|
||||
|
||||
auto cxxflags = getCXXFlags().joinIntoString (" ");
|
||||
auto cxxflags = getCXXFlags (config).joinIntoString (" ");
|
||||
|
||||
if (cxxflags.isNotEmpty())
|
||||
out << " " << cxxflags;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue