소스 검색

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
Brad King 5 년 전
부모
커밋
06f921d9f6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Source/cmExportFileGenerator.cxx

+ 1 - 1
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;