1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-31 03:00:05 +00:00

Introjucer: Added option to select C++ language standard for Xcode.

This commit is contained in:
Timur Doumler 2015-05-22 09:34:41 +01:00
parent f12ede92e5
commit fc2f9e848d
2 changed files with 21 additions and 1 deletions

View file

@ -195,6 +195,8 @@ protected:
String getMacArchitecture() const { return config [Ids::osxArchitecture]; }
Value getCustomXcodeFlagsValue() { return getValue (Ids::customXcodeFlags); }
String getCustomXcodeFlags() const { return config [Ids::customXcodeFlags]; }
Value getCppLanguageStandardValue() { return getValue (Ids::cppLanguageStandard); }
String getCppLanguageStandard() const { return config [Ids::cppLanguageStandard]; }
Value getCppLibTypeValue() { return getValue (Ids::cppLibType); }
String getCppLibType() const { return config [Ids::cppLibType]; }
Value getCodeSignIdentityValue() { return getValue (Ids::codeSigningIdentity); }
@ -253,10 +255,24 @@ protected:
"A comma-separated list of custom Xcode setting flags which will be appended to the list of generated flags, "
"e.g. MACOSX_DEPLOYMENT_TARGET_i386 = 10.5, VALID_ARCHS = \"ppc i386 x86_64\"");
const char* cppLibNames[] = { "Use Default", "Use LLVM libc++", nullptr };
const char* cppLanguageStandardNames[] = { "Use Default", "C++98", "GNU++98", "C++11", "GNU++11", "C++14", "GNU++14", nullptr };
Array<var> cppLanguageStandardValues;
cppLanguageStandardValues.add (var::null);
cppLanguageStandardValues.add ("c++98");
cppLanguageStandardValues.add ("gnu++98");
cppLanguageStandardValues.add ("c++11");
cppLanguageStandardValues.add ("gnu++11");
cppLanguageStandardValues.add ("c++14");
cppLanguageStandardValues.add ("gnu++14");
props.add (new ChoicePropertyComponent (getCppLanguageStandardValue(), "C++ Language Standard", StringArray (cppLanguageStandardNames), cppLanguageStandardValues),
"The standard of the C++ language that will be used for compilation.");
const char* cppLibNames[] = { "Use Default", "LLVM libc++", "GNU libstdc++", nullptr };
Array<var> cppLibValues;
cppLibValues.add (var::null);
cppLibValues.add ("libc++");
cppLibValues.add ("libstdc++");
props.add (new ChoicePropertyComponent (getCppLibTypeValue(), "C++ Library", StringArray (cppLibNames), cppLibValues),
"The type of C++ std lib that will be linked.");
@ -844,6 +860,9 @@ private:
if (config.getCodeSignIdentity().isNotEmpty())
s.add ("CODE_SIGN_IDENTITY = " + config.getCodeSignIdentity().quoted());
if (config.getCppLanguageStandard().isNotEmpty())
s.add ("CLANG_CXX_LANGUAGE_STANDARD = " + config.getCppLanguageStandard().quoted());
if (config.getCppLibType().isNotEmpty())
s.add ("CLANG_CXX_LIBRARY = " + config.getCppLibType().quoted());

View file

@ -75,6 +75,7 @@ namespace Ids
DECLARE_ID (systemHeaderPath);
DECLARE_ID (libraryPath);
DECLARE_ID (customXcodeFlags);
DECLARE_ID (cppLanguageStandard);
DECLARE_ID (cppLibType);
DECLARE_ID (codeSigningIdentity);
DECLARE_ID (fastMath);