mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
Autogen: Use more readable variable names for static const AUTO* strings
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::GenNameGen = "AutoGen";
|
||||
std::string const cmQtAutoGen::GenNameMoc = "AutoMoc";
|
||||
std::string const cmQtAutoGen::GenNameUic = "AutoUic";
|
||||
std::string const cmQtAutoGen::GenNameRcc = "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::GenNameGenUpper = "AUTOGEN";
|
||||
std::string const cmQtAutoGen::GenNameMocUpper = "AUTOMOC";
|
||||
std::string const cmQtAutoGen::GenNameUicUpper = "AUTOUIC";
|
||||
std::string const cmQtAutoGen::GenNameRccUpper = "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)
|
||||
{
|
||||
switch (genType) {
|
||||
case GenT::GEN:
|
||||
return GenNameGen;
|
||||
return GenAutoGen;
|
||||
case GenT::MOC:
|
||||
return GenNameMoc;
|
||||
return GenAutoMoc;
|
||||
case GenT::UIC:
|
||||
return GenNameUic;
|
||||
return GenAutoUic;
|
||||
case GenT::RCC:
|
||||
return GenNameRcc;
|
||||
return GenAutoRcc;
|
||||
}
|
||||
return GenNameGen;
|
||||
return GenAutoGen;
|
||||
}
|
||||
|
||||
std::string const& cmQtAutoGen::GeneratorNameUpper(GenT genType)
|
||||
{
|
||||
switch (genType) {
|
||||
case GenT::GEN:
|
||||
return GenNameGenUpper;
|
||||
return GenAUTOGEN;
|
||||
case GenT::MOC:
|
||||
return GenNameMocUpper;
|
||||
return GenAUTOMOC;
|
||||
case GenT::UIC:
|
||||
return GenNameUicUpper;
|
||||
return GenAUTOUIC;
|
||||
case GenT::RCC:
|
||||
return GenNameRccUpper;
|
||||
return GenAUTORCC;
|
||||
}
|
||||
return GenNameGenUpper;
|
||||
return GenAUTOGEN;
|
||||
}
|
||||
|
||||
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("AUTOMOC");
|
||||
lst.emplace_back(GenAUTOMOC);
|
||||
}
|
||||
if (uic) {
|
||||
lst.emplace_back("AUTOUIC");
|
||||
lst.emplace_back(GenAUTOUIC);
|
||||
}
|
||||
if (rcc) {
|
||||
lst.emplace_back("AUTORCC");
|
||||
lst.emplace_back(GenAUTORCC);
|
||||
}
|
||||
switch (lst.size()) {
|
||||
case 1:
|
||||
|
||||
@@ -52,14 +52,14 @@ public:
|
||||
/// @brief Nested lists separator
|
||||
static std::string const ListSep;
|
||||
// Generator names
|
||||
static std::string const GenNameGen;
|
||||
static std::string const GenNameMoc;
|
||||
static std::string const GenNameUic;
|
||||
static std::string const GenNameRcc;
|
||||
static std::string const GenNameGenUpper;
|
||||
static std::string const GenNameMocUpper;
|
||||
static std::string const GenNameUicUpper;
|
||||
static std::string const GenNameRccUpper;
|
||||
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;
|
||||
|
||||
|
||||
@@ -74,9 +74,9 @@ cmQtAutoGenGlobalInitializer::cmQtAutoGenGlobalInitializer(
|
||||
continue;
|
||||
}
|
||||
|
||||
bool const moc = target->GetPropertyAsBool("AUTOMOC");
|
||||
bool const uic = target->GetPropertyAsBool("AUTOUIC");
|
||||
bool const rcc = target->GetPropertyAsBool("AUTORCC");
|
||||
bool const moc = target->GetPropertyAsBool(cmQtAutoGen::GenAUTOMOC);
|
||||
bool const uic = target->GetPropertyAsBool(cmQtAutoGen::GenAUTOUIC);
|
||||
bool const rcc = target->GetPropertyAsBool(cmQtAutoGen::GenAUTORCC);
|
||||
if (moc || uic || rcc) {
|
||||
std::string const mocExec =
|
||||
target->GetSafeProperty("AUTOMOC_EXECUTABLE");
|
||||
|
||||
@@ -212,8 +212,8 @@ private:
|
||||
|
||||
/// @brief Constructor
|
||||
MocT()
|
||||
: GenVarsT(cmQtAutoGen::GenT::MOC, cmQtAutoGen::GenNameMoc,
|
||||
cmQtAutoGen::GenNameMocUpper){};
|
||||
: GenVarsT(cmQtAutoGen::GenT::MOC, cmQtAutoGen::GenAutoMoc,
|
||||
cmQtAutoGen::GenAUTOMOC){};
|
||||
} Moc;
|
||||
|
||||
/// @brief Uic only variables
|
||||
@@ -228,8 +228,8 @@ private:
|
||||
|
||||
/// @brief Constructor
|
||||
UicT()
|
||||
: GenVarsT(cmQtAutoGen::GenT::UIC, cmQtAutoGen::GenNameUic,
|
||||
cmQtAutoGen::GenNameUicUpper){};
|
||||
: GenVarsT(cmQtAutoGen::GenT::UIC, cmQtAutoGen::GenAutoUic,
|
||||
cmQtAutoGen::GenAUTOUIC){};
|
||||
} Uic;
|
||||
|
||||
/// @brief Rcc only variables
|
||||
@@ -241,8 +241,8 @@ private:
|
||||
|
||||
/// @brief Constructor
|
||||
RccT()
|
||||
: GenVarsT(cmQtAutoGen::GenT::RCC, cmQtAutoGen::GenNameRcc,
|
||||
cmQtAutoGen::GenNameRccUpper){};
|
||||
: GenVarsT(cmQtAutoGen::GenT::RCC, cmQtAutoGen::GenAutoRcc,
|
||||
cmQtAutoGen::GenAUTORCC){};
|
||||
} Rcc;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user