mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 22:30:13 -06:00
Autogen: Remove static const generator name strings from cmQtAutoGen
This commit is contained in:
@@ -73,44 +73,44 @@ void MergeOptions(std::vector<std::string>& baseOpts,
|
||||
unsigned int const cmQtAutoGen::ParallelMax = 64;
|
||||
std::string const cmQtAutoGen::ListSep = "<<<S>>>";
|
||||
|
||||
std::string const cmQtAutoGen::GenAutoGen = "AutoGen";
|
||||
std::string const cmQtAutoGen::GenAutoMoc = "AutoMoc";
|
||||
std::string const cmQtAutoGen::GenAutoUic = "AutoUic";
|
||||
std::string const cmQtAutoGen::GenAutoRcc = "AutoRcc";
|
||||
|
||||
std::string const cmQtAutoGen::GenAUTOGEN = "AUTOGEN";
|
||||
std::string const cmQtAutoGen::GenAUTOMOC = "AUTOMOC";
|
||||
std::string const cmQtAutoGen::GenAUTOUIC = "AUTOUIC";
|
||||
std::string const cmQtAutoGen::GenAUTORCC = "AUTORCC";
|
||||
|
||||
std::string const& cmQtAutoGen::GeneratorName(GenT genType)
|
||||
{
|
||||
static const std::string AutoGen("AutoGen");
|
||||
static const std::string AutoMoc("AutoMoc");
|
||||
static const std::string AutoUic("AutoUic");
|
||||
static const std::string AutoRcc("AutoRcc");
|
||||
|
||||
switch (genType) {
|
||||
case GenT::GEN:
|
||||
return GenAutoGen;
|
||||
return AutoGen;
|
||||
case GenT::MOC:
|
||||
return GenAutoMoc;
|
||||
return AutoMoc;
|
||||
case GenT::UIC:
|
||||
return GenAutoUic;
|
||||
return AutoUic;
|
||||
case GenT::RCC:
|
||||
return GenAutoRcc;
|
||||
return AutoRcc;
|
||||
}
|
||||
return GenAutoGen;
|
||||
return AutoGen;
|
||||
}
|
||||
|
||||
std::string const& cmQtAutoGen::GeneratorNameUpper(GenT genType)
|
||||
{
|
||||
static const std::string AUTOGEN("AUTOGEN");
|
||||
static const std::string AUTOMOC("AUTOMOC");
|
||||
static const std::string AUTOUIC("AUTOUIC");
|
||||
static const std::string AUTORCC("AUTORCC");
|
||||
|
||||
switch (genType) {
|
||||
case GenT::GEN:
|
||||
return GenAUTOGEN;
|
||||
return AUTOGEN;
|
||||
case GenT::MOC:
|
||||
return GenAUTOMOC;
|
||||
return AUTOMOC;
|
||||
case GenT::UIC:
|
||||
return GenAUTOUIC;
|
||||
return AUTOUIC;
|
||||
case GenT::RCC:
|
||||
return GenAUTORCC;
|
||||
return AUTORCC;
|
||||
}
|
||||
return GenAUTOGEN;
|
||||
return AUTOGEN;
|
||||
}
|
||||
|
||||
std::string cmQtAutoGen::Tools(bool moc, bool uic, bool rcc)
|
||||
@@ -118,13 +118,13 @@ std::string cmQtAutoGen::Tools(bool moc, bool uic, bool rcc)
|
||||
std::string res;
|
||||
std::vector<std::string> lst;
|
||||
if (moc) {
|
||||
lst.emplace_back(GenAUTOMOC);
|
||||
lst.emplace_back("AUTOMOC");
|
||||
}
|
||||
if (uic) {
|
||||
lst.emplace_back(GenAUTOUIC);
|
||||
lst.emplace_back("AUTOUIC");
|
||||
}
|
||||
if (rcc) {
|
||||
lst.emplace_back(GenAUTORCC);
|
||||
lst.emplace_back("AUTORCC");
|
||||
}
|
||||
switch (lst.size()) {
|
||||
case 1:
|
||||
|
||||
@@ -51,15 +51,6 @@ public:
|
||||
|
||||
/// @brief Nested lists separator
|
||||
static std::string const ListSep;
|
||||
// Generator names
|
||||
static std::string const GenAutoGen;
|
||||
static std::string const GenAutoMoc;
|
||||
static std::string const GenAutoUic;
|
||||
static std::string const GenAutoRcc;
|
||||
static std::string const GenAUTOGEN;
|
||||
static std::string const GenAUTOMOC;
|
||||
static std::string const GenAUTOUIC;
|
||||
static std::string const GenAUTORCC;
|
||||
/// @brief Maximum number of parallel threads/processes in a generator
|
||||
static unsigned int const ParallelMax;
|
||||
|
||||
|
||||
@@ -81,9 +81,9 @@ cmQtAutoGenGlobalInitializer::cmQtAutoGenGlobalInitializer(
|
||||
continue;
|
||||
}
|
||||
|
||||
bool const moc = target->GetPropertyAsBool(cmQtAutoGen::GenAUTOMOC);
|
||||
bool const uic = target->GetPropertyAsBool(cmQtAutoGen::GenAUTOUIC);
|
||||
bool const rcc = target->GetPropertyAsBool(cmQtAutoGen::GenAUTORCC);
|
||||
bool const moc = target->GetPropertyAsBool(kw().AUTOMOC);
|
||||
bool const uic = target->GetPropertyAsBool(kw().AUTOUIC);
|
||||
bool const rcc = target->GetPropertyAsBool(kw().AUTORCC);
|
||||
if (moc || uic || rcc) {
|
||||
std::string const mocExec =
|
||||
target->GetSafeProperty("AUTOMOC_EXECUTABLE");
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
std::vector<cmLocalGenerator*> const& localGenerators);
|
||||
~cmQtAutoGenGlobalInitializer();
|
||||
|
||||
Keywords const* kw() const { return Keywords_.get(); };
|
||||
Keywords const& kw() const { return Keywords_; };
|
||||
|
||||
bool generate();
|
||||
|
||||
@@ -62,7 +62,7 @@ private:
|
||||
std::map<cmLocalGenerator*, std::string> GlobalAutoGenTargets_;
|
||||
std::map<cmLocalGenerator*, std::string> GlobalAutoRccTargets_;
|
||||
std::unordered_map<std::string, std::string> ExecutableTestOutputs_;
|
||||
std::unique_ptr<Keywords> Keywords_;
|
||||
Keywords const Keywords_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user