mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Build: Update the minimum C++ standard to C++17
This commit is contained in:
parent
e9e39de069
commit
b3a4d54a72
90 changed files with 213 additions and 141 deletions
|
|
@ -236,7 +236,7 @@ bool Project::setCppVersionFromOldExporterSettings()
|
|||
}
|
||||
}
|
||||
|
||||
if (highestLanguageStandard >= 14)
|
||||
if (highestLanguageStandard >= 17)
|
||||
{
|
||||
cppStandardValue = highestLanguageStandard;
|
||||
return true;
|
||||
|
|
@ -247,8 +247,14 @@ bool Project::setCppVersionFromOldExporterSettings()
|
|||
|
||||
void Project::updateDeprecatedProjectSettings()
|
||||
{
|
||||
if (cppStandardValue.get().toString() == "11")
|
||||
cppStandardValue.resetToDefault();
|
||||
for (const auto& version : { "11", "14" })
|
||||
{
|
||||
if (cppStandardValue.get().toString() == version)
|
||||
{
|
||||
cppStandardValue.resetToDefault();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (ExporterIterator exporter (*this); exporter.next();)
|
||||
exporter->updateDeprecatedSettings();
|
||||
|
|
@ -299,7 +305,7 @@ void Project::initialiseProjectValues()
|
|||
useAppConfigValue.referTo (projectRoot, Ids::useAppConfig, getUndoManager(), true);
|
||||
addUsingNamespaceToJuceHeader.referTo (projectRoot, Ids::addUsingNamespaceToJuceHeader, getUndoManager(), true);
|
||||
|
||||
cppStandardValue.referTo (projectRoot, Ids::cppLanguageStandard, getUndoManager(), "14");
|
||||
cppStandardValue.referTo (projectRoot, Ids::cppLanguageStandard, getUndoManager(), "17");
|
||||
|
||||
headerSearchPathsValue.referTo (projectRoot, Ids::headerPath, getUndoManager());
|
||||
preprocessorDefsValue.referTo (projectRoot, Ids::defines, getUndoManager());
|
||||
|
|
|
|||
|
|
@ -220,8 +220,8 @@ public:
|
|||
bool shouldDisplaySplashScreen() const { return displaySplashScreenValue.get(); }
|
||||
String getSplashScreenColourString() const { return splashScreenColourValue.get(); }
|
||||
|
||||
static StringArray getCppStandardStrings() { return { "C++14", "C++17", "C++20", "Use Latest" }; }
|
||||
static Array<var> getCppStandardVars() { return { "14", "17", "20", "latest" }; }
|
||||
static StringArray getCppStandardStrings() { return { "C++17", "C++20", "Use Latest" }; }
|
||||
static Array<var> getCppStandardVars() { return { "17", "20", "latest" }; }
|
||||
|
||||
static String getLatestNumberedCppStandardString()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1704,10 +1704,6 @@ public:
|
|||
if (owner.project.getCppStandardString() == "latest")
|
||||
return owner.project.getLatestNumberedCppStandardString();
|
||||
|
||||
// The AudioUnitSDK requires C++17
|
||||
if (type == AudioUnitPlugIn)
|
||||
return "17";
|
||||
|
||||
return owner.project.getCppStandardString();
|
||||
}();
|
||||
|
||||
|
|
@ -1975,17 +1971,16 @@ public:
|
|||
StringArray paths (owner.extraSearchPaths);
|
||||
paths.addArray (config.getHeaderSearchPaths());
|
||||
|
||||
if (owner.project.getEnabledModules().isModuleEnabled ("juce_audio_plugin_client"))
|
||||
constexpr auto audioPluginClient = "juce_audio_plugin_client";
|
||||
|
||||
if (owner.project.getEnabledModules().isModuleEnabled (audioPluginClient))
|
||||
{
|
||||
const auto pluginClientModule = owner.getModuleFolderRelativeToProject ("juce_audio_plugin_client");
|
||||
for (const auto& path : { pluginClientModule, // For AU resource fork
|
||||
pluginClientModule.getChildFile ("AU") }) // For AudioUnitSDK includes
|
||||
{
|
||||
paths.add (path.rebased (owner.projectFolder,
|
||||
owner.getTargetFolder(),
|
||||
build_tools::RelativePath::buildTargetFolder)
|
||||
.toUnixStyle());
|
||||
}
|
||||
paths.add (owner.getModuleFolderRelativeToProject (audioPluginClient)
|
||||
.getChildFile ("AU")
|
||||
.rebased (owner.projectFolder,
|
||||
owner.getTargetFolder(),
|
||||
build_tools::RelativePath::buildTargetFolder)
|
||||
.toUnixStyle());
|
||||
}
|
||||
|
||||
sanitiseAndEscapeSearchPaths (config, paths);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue