summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGen.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-02-14 13:44:18 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-02-21 10:37:51 (GMT)
commit14ae19c327100c137ec8cb549dfc7447c4888940 (patch)
tree7b59fe67fdab0e6dd034b5f14abddb35dfb96271 /Source/cmQtAutoGen.cxx
parenteb08e68b77954a4b439ee66b4987789b213d878a (diff)
downloadCMake-14ae19c327100c137ec8cb549dfc7447c4888940.zip
CMake-14ae19c327100c137ec8cb549dfc7447c4888940.tar.gz
CMake-14ae19c327100c137ec8cb549dfc7447c4888940.tar.bz2
Autogen: cmQtAutoGen: Store generator names in class static const strings
Diffstat (limited to 'Source/cmQtAutoGen.cxx')
-rw-r--r--Source/cmQtAutoGen.cxx47
1 files changed, 30 insertions, 17 deletions
diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx
index f437138..6e24332 100644
--- a/Source/cmQtAutoGen.cxx
+++ b/Source/cmQtAutoGen.cxx
@@ -11,13 +11,6 @@
#include <sstream>
#include <utility>
-// - Static variables
-
-std::string const genNameGen = "AutoGen";
-std::string const genNameMoc = "AutoMoc";
-std::string const genNameUic = "AutoUic";
-std::string const genNameRcc = "AutoRcc";
-
// - Static functions
/// @brief Merges newOpts into baseOpts
@@ -77,27 +70,47 @@ void MergeOptions(std::vector<std::string>& baseOpts,
// - Class definitions
-std::string const cmQtAutoGen::ListSep = "<<<S>>>";
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::GenNameGenUpper = "AUTOGEN";
+std::string const cmQtAutoGen::GenNameMocUpper = "AUTOMOC";
+std::string const cmQtAutoGen::GenNameUicUpper = "AUTOUIC";
+std::string const cmQtAutoGen::GenNameRccUpper = "AUTORCC";
-std::string const& cmQtAutoGen::GeneratorName(GeneratorT type)
+std::string const& cmQtAutoGen::GeneratorName(GeneratorT genType)
{
- switch (type) {
+ switch (genType) {
case GeneratorT::GEN:
- return genNameGen;
+ return GenNameGen;
case GeneratorT::MOC:
- return genNameMoc;
+ return GenNameMoc;
case GeneratorT::UIC:
- return genNameUic;
+ return GenNameUic;
case GeneratorT::RCC:
- return genNameRcc;
+ return GenNameRcc;
}
- return genNameGen;
+ return GenNameGen;
}
-std::string cmQtAutoGen::GeneratorNameUpper(GeneratorT genType)
+std::string const& cmQtAutoGen::GeneratorNameUpper(GeneratorT genType)
{
- return cmSystemTools::UpperCase(cmQtAutoGen::GeneratorName(genType));
+ switch (genType) {
+ case GeneratorT::GEN:
+ return GenNameGenUpper;
+ case GeneratorT::MOC:
+ return GenNameMocUpper;
+ case GeneratorT::UIC:
+ return GenNameUicUpper;
+ case GeneratorT::RCC:
+ return GenNameRccUpper;
+ }
+ return GenNameGenUpper;
}
std::string cmQtAutoGen::Tools(bool moc, bool uic, bool rcc)