diff options
author | Brad King <brad.king@kitware.com> | 2021-01-05 08:40:24 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-01-05 08:44:19 -0500 |
commit | 06f921d9f664b5819a031f85a923e28b16c4ade3 (patch) | |
tree | 449c39e81ef8bbc988d7a17e5945e6b369709f3e /Source/cmExportFileGenerator.cxx | |
parent | 764ce15ffbe232347a41e40509a2e485bae226f6 (diff) | |
download | cmake-06f921d9f664b5819a031f85a923e28b16c4ade3.tar.gz |
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
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index a853bb18d7..113751a9e9 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; |