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:
parent
52f7a9c0f4
commit
8045d89b3a
1 changed files with 20 additions and 2 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue