1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: Add C++17 flag to exporters that support it

This commit is contained in:
ed 2018-03-07 09:47:38 +00:00
parent 4d20d1a406
commit 06773f18bb
7 changed files with 12 additions and 10 deletions

View file

@ -738,8 +738,8 @@ void Project::createPropertyEditors (PropertyListBuilder& props)
"The namespace containing the binary assests.");
props.add (new ChoicePropertyComponent (cppStandardValue, "C++ Language Standard",
{ "C++11", "C++14", "Use Latest" },
{ "11", "14", "latest" }),
{ "C++11", "C++14", "C++17", "Use Latest" },
{ "11", "14", "17", "latest" }),
"The standard of the C++ language that will be used for compilation.");
props.add (new TextPropertyComponent (preprocessorDefsValue, "Preprocessor Definitions", 32768, true),

View file

@ -1441,7 +1441,7 @@ private:
auto cppStandard = project.getCppStandardString();
if (cppStandard == "latest")
if (cppStandard == "latest" || cppStandard == "17") // C++17 flag isn't supported yet so use 1z for now
cppStandard = "1z";
cppStandard = "-std=" + String (shouldUseGNUExtensions() ? "gnu++" : "c++") + cppStandard;

View file

@ -455,7 +455,7 @@ private:
auto cxxStandard = project.getCppStandardString();
if (cxxStandard == "latest")
cxxStandard = "1z";
cxxStandard = "17";
out << " CXX_STANDARD " << cxxStandard << newLine;
@ -584,7 +584,7 @@ private:
auto cxxStandard = project.getCppStandardString();
if (cxxStandard == "latest")
cxxStandard = "1z";
cxxStandard = "17";
out << " CXX_STANDARD " << cxxStandard << newLine;
@ -980,7 +980,7 @@ private:
auto cxxStandard = project.getCppStandardString();
if (cxxStandard == "latest")
cxxStandard = "1z";
cxxStandard = "17";
out << " CXX_STANDARD " << cxxStandard << newLine;

View file

@ -426,7 +426,7 @@ private:
auto cppStandard = config.project.getCppStandardString();
if (cppStandard == "latest")
cppStandard = "1z";
cppStandard = "17";
cppStandard = "-std=" + String (shouldUseGNUExtensions() ? "gnu++" : "c++") + cppStandard;

View file

@ -566,8 +566,10 @@ public:
auto cppStandard = owner.project.getCppStandardString();
if (cppStandard == "11") // unfortunaly VS doesn't support the C++11 flag so we have to bump it to C++14
if (cppStandard == "11") // VS doesn't support the C++11 flag so we have to bump it to C++14
cppStandard = "14";
else if (cppStandard == "17") // nor does it support the C++17 flag, so we'll just use latest for now until it's added
cppStandard = "latest";
cl->createNewChildElement ("LanguageStandard")->addTextElement ("stdcpp" + cppStandard);
}

View file

@ -535,7 +535,7 @@ private:
auto cppStandard = project.getCppStandardString();
if (cppStandard == "latest")
cppStandard = "1z";
cppStandard = "17";
cppStandard = "-std=" + String (shouldUseGNUExtensions() ? "gnu++" : "c++") + cppStandard;

View file

@ -1119,7 +1119,7 @@ public:
auto cppStandard = owner.project.getCppStandardString();
if (cppStandard == "latest")
cppStandard = "1z";
cppStandard = "17";
s.set ("CLANG_CXX_LANGUAGE_STANDARD", (String (owner.shouldUseGNUExtensions() ? "gnu++"
: "c++") + cppStandard).quoted());