summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx49
1 files changed, 32 insertions, 17 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 068cf5e..79d77e7 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -21,6 +21,7 @@
#include "cmLocalGenerator.h"
#include "cmLocalXCodeGenerator.h"
#include "cmMakefile.h"
+#include "cmMessageType.h"
#include "cmOutputConverter.h"
#include "cmSourceFile.h"
#include "cmSourceGroup.h"
@@ -132,13 +133,27 @@ public:
cmGlobalXCodeGenerator::GetDocumentation(entry);
}
- void GetGenerators(std::vector<std::string>& names) const override
+ std::vector<std::string> GetGeneratorNames() const override
{
+ std::vector<std::string> names;
names.push_back(cmGlobalXCodeGenerator::GetActualName());
+ return names;
+ }
+
+ std::vector<std::string> GetGeneratorNamesWithPlatform() const override
+ {
+ return std::vector<std::string>();
}
bool SupportsToolset() const override { return true; }
bool SupportsPlatform() const override { return false; }
+
+ std::vector<std::string> GetKnownPlatforms() const override
+ {
+ return std::vector<std::string>();
+ }
+
+ std::string GetDefaultPlatformName() const override { return std::string(); }
};
cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(
@@ -203,7 +218,7 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::Factory::CreateGlobalGenerator(
unsigned int version_number = 10 * v[0] + v[1];
if (version_number < 30) {
- cm->IssueMessage(cmake::FATAL_ERROR,
+ cm->IssueMessage(MessageType::FATAL_ERROR,
"Xcode " + version_string + " not supported.");
return nullptr;
}
@@ -265,7 +280,7 @@ bool cmGlobalXCodeGenerator::SetGeneratorToolset(std::string const& ts,
" " << ts << "\n"
"that was specified.";
/* clang-format on */
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
+ mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
return false;
}
this->GeneratorToolset = ts;
@@ -330,14 +345,14 @@ void cmGlobalXCodeGenerator::GenerateBuildCommand(
int jobs, bool /*verbose*/, std::vector<std::string> const& makeOptions)
{
// now build the test
- makeCommand.push_back(
+ makeCommand.emplace_back(
this->SelectMakeProgram(makeProgram, this->GetXcodeBuildCommand()));
- makeCommand.push_back("-project");
+ makeCommand.emplace_back("-project");
std::string projectArg = projectName;
projectArg += ".xcode";
projectArg += "proj";
- makeCommand.push_back(projectArg);
+ makeCommand.emplace_back(projectArg);
bool clean = false;
std::string realTarget = targetName;
@@ -346,23 +361,23 @@ void cmGlobalXCodeGenerator::GenerateBuildCommand(
realTarget = "ALL_BUILD";
}
if (clean) {
- makeCommand.push_back("clean");
+ makeCommand.emplace_back("clean");
} else {
- makeCommand.push_back("build");
+ makeCommand.emplace_back("build");
}
- makeCommand.push_back("-target");
+ makeCommand.emplace_back("-target");
if (!realTarget.empty()) {
- makeCommand.push_back(realTarget);
+ makeCommand.emplace_back(realTarget);
} else {
- makeCommand.push_back("ALL_BUILD");
+ makeCommand.emplace_back("ALL_BUILD");
}
- makeCommand.push_back("-configuration");
- makeCommand.push_back(!config.empty() ? config : "Debug");
+ makeCommand.emplace_back("-configuration");
+ makeCommand.emplace_back(!config.empty() ? config : "Debug");
if (jobs != cmake::NO_BUILD_PARALLEL_LEVEL) {
- makeCommand.push_back("-jobs");
+ makeCommand.emplace_back("-jobs");
if (jobs != cmake::DEFAULT_BUILD_PARALLEL_LEVEL) {
- makeCommand.push_back(std::to_string(jobs));
+ makeCommand.emplace_back(std::to_string(jobs));
}
}
@@ -776,7 +791,7 @@ public:
"specified for source:\n"
" " << this->SourceFile->GetFullPath() << "\n";
/* clang-format on */
- this->LocalGenerator->IssueMessage(cmake::FATAL_ERROR, e.str());
+ this->LocalGenerator->IssueMessage(MessageType::FATAL_ERROR, e.str());
}
return processed;
@@ -1052,7 +1067,7 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen)
this->CurrentConfigurationTypes.clear();
this->CurrentMakefile->GetConfigurations(this->CurrentConfigurationTypes);
if (this->CurrentConfigurationTypes.empty()) {
- this->CurrentConfigurationTypes.push_back("");
+ this->CurrentConfigurationTypes.emplace_back();
}
}