summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-01-05 13:40:24 (GMT)
committerBrad King <brad.king@kitware.com>2021-01-05 13:44:19 (GMT)
commit06f921d9f664b5819a031f85a923e28b16c4ade3 (patch)
tree449c39e81ef8bbc988d7a17e5945e6b369709f3e
parent764ce15ffbe232347a41e40509a2e485bae226f6 (diff)
downloadCMake-06f921d9f664b5819a031f85a923e28b16c4ade3.zip
CMake-06f921d9f664b5819a031f85a923e28b16c4ade3.tar.gz
CMake-06f921d9f664b5819a031f85a923e28b16c4ade3.tar.bz2
export: Fix replacement of multiple TARGET_NAME expressions
After replacing each such expression, search for following expressions immediately after the end of the replacement text, not after the position of the end of the replaced text. Fixes: #21661
-rw-r--r--Source/cmExportFileGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index a853bb1..113751a 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -707,7 +707,7 @@ void cmExportFileGenerator::ResolveTargetsInGeneratorExpression(
break;
}
input.replace(pos, endPos - pos + 1, targetName);
- lastPos = endPos;
+ lastPos = pos + targetName.size();
}
pos = 0;