mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-16 00:34:19 +00:00
Added Projucer option to select c++ language standard in Android exporter
This commit is contained in:
parent
f207ebb6d8
commit
c26f9f3720
1 changed files with 17 additions and 1 deletions
|
|
@ -752,8 +752,19 @@ private:
|
|||
{
|
||||
props.add (new TextPropertyComponent (androidTheme.getPropertyAsValue(), "Android Theme", 256, false),
|
||||
"E.g. @android:style/Theme.NoTitleBar or leave blank for default");
|
||||
|
||||
static const char* cppStandardNames[] = { "C++03", "C++11", "C++14", nullptr };
|
||||
static const char* cppStandardValues[] = { "-std=c++03", "-std=c++11", "-std=c++14", nullptr };
|
||||
|
||||
props.add (new ChoicePropertyComponent (getCppStandardValue(), "C++ standard to use",
|
||||
StringArray (cppStandardNames), Array<var> (cppStandardValues)),
|
||||
"The C++ standard to specify in the makefile");
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
Value getCppStandardValue() { return getSetting (Ids::cppLanguageStandard); }
|
||||
String getCppStandardString() const { return settings[Ids::cppLanguageStandard]; }
|
||||
|
||||
//==============================================================================
|
||||
String createDefaultClassName() const
|
||||
{
|
||||
|
|
@ -1037,7 +1048,12 @@ private:
|
|||
StringArray getAndroidCxxCompilerFlags() const
|
||||
{
|
||||
StringArray cxxFlags (getAndroidCompilerFlags());
|
||||
cxxFlags.add ("\"-std=gnu++11\"");
|
||||
String cppStandardToUse (getCppStandardString());
|
||||
|
||||
if (cppStandardToUse.isEmpty())
|
||||
cppStandardToUse = "-std=c++11";
|
||||
|
||||
cxxFlags.add ("\"" + cppStandardToUse + "\"");
|
||||
|
||||
return cxxFlags;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue