summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-12-18 12:31:57 (GMT)
committerBrad King <brad.king@kitware.com>2017-12-20 13:14:03 (GMT)
commit683e9023a70792845544f61daf570c5bfe329ac1 (patch)
tree6e307cb202c3104394c74ff52eb63653417cf8af /Source
parent166bf4c490b8f46eca057fc23c3f3c2e042e9cb3 (diff)
downloadCMake-683e9023a70792845544f61daf570c5bfe329ac1.zip
CMake-683e9023a70792845544f61daf570c5bfe329ac1.tar.gz
CMake-683e9023a70792845544f61daf570c5bfe329ac1.tar.bz2
Autogen: Fix for problematic nested list separator
In the AutogenInfo.cmake file the separator for nested lists was `@LSEP@` which led to a speed regression because the `@` character triggered an (unsuccessful) expression evaluation. By setting the policy version of the CMake instance in the `_autogen` target to 3.9, the OLD `@` evaluating behavior controlled by policy CMP0053 is disabled. Also the nested lists separator string is changed to `<<<S>>>`, which solves the problem twofold. Issue: #17570
Diffstat (limited to 'Source')
-rw-r--r--Source/cmQtAutoGen.cxx2
-rw-r--r--Source/cmQtAutoGenerators.cxx3
2 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx
index 5e89978..0fc2fc0 100644
--- a/Source/cmQtAutoGen.cxx
+++ b/Source/cmQtAutoGen.cxx
@@ -248,7 +248,7 @@ static bool RccListInputsQt5(std::string const& rccCommand,
// - Class definitions
-std::string const cmQtAutoGen::listSep = "@LSEP@";
+std::string const cmQtAutoGen::listSep = "<<<S>>>";
std::string const& cmQtAutoGen::GeneratorName(Generator type)
{
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index b329d38..a9c9b9d 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -171,6 +171,9 @@ bool cmQtAutoGenerators::Run(std::string const& targetDirectory,
snapshot.GetDirectory().SetCurrentSource(targetDirectory);
auto makefile = cm::make_unique<cmMakefile>(&gg, snapshot);
+ // The OLD/WARN behavior for policy CMP0053 caused a speed regression.
+ // https://gitlab.kitware.com/cmake/cmake/issues/17570
+ makefile->SetPolicyVersion("3.9");
gg.SetCurrentMakefile(makefile.get());
bool success = false;