summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGeneratorInitializer.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-08-31 14:03:52 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-09-07 15:53:19 (GMT)
commit761b3d79746ab91219d6478a021ba3a1c56f05c8 (patch)
tree1c6891affc7c5a75590295934c6860ce4823bf45 /Source/cmQtAutoGeneratorInitializer.cxx
parent84658539bca3d0d45873872007b01a45712ba621 (diff)
downloadCMake-761b3d79746ab91219d6478a021ba3a1c56f05c8.zip
CMake-761b3d79746ab91219d6478a021ba3a1c56f05c8.tar.gz
CMake-761b3d79746ab91219d6478a021ba3a1c56f05c8.tar.bz2
Autogen: Add functions to read/write a list of lists
Diffstat (limited to 'Source/cmQtAutoGeneratorInitializer.cxx')
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index d04e5b7..0333a55 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -207,6 +207,22 @@ static void AddDefinitionEscaped(cmMakefile* makefile, const char* key,
key, cmOutputConverter::EscapeForCMake(cmJoin(values, ";")).c_str());
}
+static void AddDefinitionEscaped(
+ cmMakefile* makefile, const char* key,
+ const std::vector<std::vector<std::string>>& lists)
+{
+ std::vector<std::string> seplist;
+ for (const std::vector<std::string>& list : lists) {
+ std::string blist = "{";
+ blist += cmJoin(list, ";");
+ blist += "}";
+ seplist.push_back(std::move(blist));
+ }
+ makefile->AddDefinition(key, cmOutputConverter::EscapeForCMake(
+ cmJoin(seplist, cmQtAutoGen::listSep))
+ .c_str());
+}
+
static bool AddToSourceGroup(cmMakefile* makefile, const std::string& fileName,
cmQtAutoGen::GeneratorType genType)
{