Browse Source

Introjucer: added C++ standard as an option in linux makefiles

tags/2021-05-28
jules Joshua Gerrard 9 years ago
parent
commit
8045d89b3a
1 changed files with 20 additions and 2 deletions
  1. +20
    -2
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Make.h

+ 20
- 2
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Make.h View File

@@ -57,8 +57,19 @@ public:
bool isLinux() const override { return true; } bool isLinux() const override { return true; }
bool canCopeWithDuplicateFiles() override { return false; } bool canCopeWithDuplicateFiles() override { return false; }
void createExporterProperties (PropertyListBuilder&) override
Value getCppStandardValue() { return getSetting (Ids::cppLanguageStandard); }
String getCppStandardString() const { return settings[Ids::cppLanguageStandard]; }
void createExporterProperties (PropertyListBuilder& properties) override
{ {
static const char* cppStandardNames[] = { "C++03", "C++11", nullptr };
static const char* cppStandardValues[] = { "-std=c++03", "-std=c++11", nullptr };
properties.add (new ChoicePropertyComponent (getCppStandardValue(),
"C++ standard to use",
StringArray (cppStandardNames),
Array<var> (cppStandardValues)),
"The C++ standard to specify in the makefile");
} }
//============================================================================== //==============================================================================
@@ -237,7 +248,14 @@ private:
<< (" " + replacePreprocessorTokens (config, getExtraCompilerFlagsString())).trimEnd() << (" " + replacePreprocessorTokens (config, getExtraCompilerFlagsString())).trimEnd()
<< newLine; << newLine;
out << " CXXFLAGS += $(CFLAGS) -std=c++11" << newLine;
String cppStandardToUse (getCppStandardString());
if (cppStandardToUse.isEmpty())
cppStandardToUse = "-std=c++11";
out << " CXXFLAGS += $(CFLAGS) "
<< cppStandardToUse
<< newLine;
writeLinkerFlags (out, config); writeLinkerFlags (out, config);


Loading…
Cancel
Save