Browse Source

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

tags/2021-05-28
ed 7 years ago
parent
commit
06773f18bb
7 changed files with 12 additions and 10 deletions
  1. +2
    -2
      extras/Projucer/Source/Project/jucer_Project.cpp
  2. +1
    -1
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h
  3. +3
    -3
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h
  4. +1
    -1
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h
  5. +3
    -1
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h
  6. +1
    -1
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h
  7. +1
    -1
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h

+ 2
- 2
extras/Projucer/Source/Project/jucer_Project.cpp 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),


+ 1
- 1
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h 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;


+ 3
- 3
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CLion.h 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;


+ 1
- 1
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h 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;


+ 3
- 1
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h 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);
}


+ 1
- 1
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Make.h 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;


+ 1
- 1
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h 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());


Loading…
Cancel
Save