diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h index c19cc71b47..5f17f7854a 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h @@ -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 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 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()); diff --git a/extras/Introjucer/Source/Utility/jucer_PresetIDs.h b/extras/Introjucer/Source/Utility/jucer_PresetIDs.h index 0e0275d9a5..87c5574c3f 100644 --- a/extras/Introjucer/Source/Utility/jucer_PresetIDs.h +++ b/extras/Introjucer/Source/Utility/jucer_PresetIDs.h @@ -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);