PR feedback - now allows for multiple specializations on the command-line, and changed the switch name to "specializations" to reflect that.

This commit is contained in:
mbalfour
2021-05-12 08:56:49 -05:00
parent b5e87d3601
commit ae9b36c135
2 changed files with 7 additions and 4 deletions
@@ -64,10 +64,12 @@ namespace AZ
AZ::SettingsRegistryInterface::Specializations projectSpecializations{ projectName };
// If a project specialization has been passed in via the command line, use it.
if (m_commandLine.HasSwitch("specialization"))
if (size_t specializationCount = m_commandLine.GetNumSwitchValues("specializations"); specializationCount > 0)
{
AZStd::string specialization = m_commandLine.GetSwitchValue("specialization", 0);
projectSpecializations.Append(specialization);
for (size_t specializationIndex = 0; specializationIndex < specializationCount; ++specializationIndex)
{
projectSpecializations.Append(m_commandLine.GetSwitchValue("specializations", specializationIndex));
}
}
// Otherwise, if a config file was passed in, auto-set the specialization based on the config file name.
else