diff options
author | Brad King <brad.king@kitware.com> | 2019-01-16 14:51:26 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-16 14:51:33 (GMT) |
commit | e44cc45530b002546bae11a34e77a3a730fd14e4 (patch) | |
tree | 4c085af51563cde788a63e4c2311e15242729299 /Source/cmQtAutoGen.cxx | |
parent | a8b447d72e13b3356893737adba0a46ea065f70d (diff) | |
parent | 5fe18eee1392c312612fad0e6f408ea7cb1ef29d (diff) | |
download | CMake-e44cc45530b002546bae11a34e77a3a730fd14e4.zip CMake-e44cc45530b002546bae11a34e77a3a730fd14e4.tar.gz CMake-e44cc45530b002546bae11a34e77a3a730fd14e4.tar.bz2 |
Merge topic 'autogen_adaptive_warning'
5fe18eee13 Autogen: Adaptive missing Qt warning
f2f1661334 Autogen: Add and use QtAutoGen::Tools method
b2343ff086 Autogen: Fix rcc validity check
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2806
Diffstat (limited to 'Source/cmQtAutoGen.cxx')
-rw-r--r-- | Source/cmQtAutoGen.cxx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx index 2786646..653caf7 100644 --- a/Source/cmQtAutoGen.cxx +++ b/Source/cmQtAutoGen.cxx @@ -100,6 +100,41 @@ std::string cmQtAutoGen::GeneratorNameUpper(GeneratorT genType) return cmSystemTools::UpperCase(cmQtAutoGen::GeneratorName(genType)); } +std::string cmQtAutoGen::Tools(bool moc, bool uic, bool rcc) +{ + std::string res; + std::vector<std::string> lst; + if (moc) { + lst.emplace_back("AUTOMOC"); + } + if (uic) { + lst.emplace_back("AUTOUIC"); + } + if (rcc) { + lst.emplace_back("AUTORCC"); + } + switch (lst.size()) { + case 1: + res += lst.at(0); + break; + case 2: + res += lst.at(0); + res += " and "; + res += lst.at(1); + break; + case 3: + res += lst.at(0); + res += ", "; + res += lst.at(1); + res += " and "; + res += lst.at(2); + break; + default: + break; + } + return res; +} + std::string cmQtAutoGen::Quoted(std::string const& text) { static const char* rep[18] = { "\\", "\\\\", "\"", "\\\"", "\a", "\\a", |