1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-22 01:34:21 +00:00

Introjucer: added C++ standard as an option in linux makefiles

This commit is contained in:
jules 2015-10-29 17:14:42 +00:00 committed by Joshua Gerrard
parent 52f7a9c0f4
commit 8045d89b3a

View file

@ -57,8 +57,19 @@ public:
bool isLinux() const override { return true; }
bool canCopeWithDuplicateFiles() override { return false; }
void createExporterProperties (PropertyListBuilder&) override
Value getCppStandardValue() { return getSetting (Ids::cppLanguageStandard); }
String getCppStandardString() const { return settings[Ids::cppLanguageStandard]; }
void createExporterProperties (PropertyListBuilder& properties) override
{
static const char* cppStandardNames[] = { "C++03", "C++11", nullptr };
static const char* cppStandardValues[] = { "-std=c++03", "-std=c++11", nullptr };
properties.add (new ChoicePropertyComponent (getCppStandardValue(),
"C++ standard to use",
StringArray (cppStandardNames),
Array<var> (cppStandardValues)),
"The C++ standard to specify in the makefile");
}
//==============================================================================
@ -237,7 +248,14 @@ private:
<< (" " + replacePreprocessorTokens (config, getExtraCompilerFlagsString())).trimEnd()
<< newLine;
out << " CXXFLAGS += $(CFLAGS) -std=c++11" << newLine;
String cppStandardToUse (getCppStandardString());
if (cppStandardToUse.isEmpty())
cppStandardToUse = "-std=c++11";
out << " CXXFLAGS += $(CFLAGS) "
<< cppStandardToUse
<< newLine;
writeLinkerFlags (out, config);