Don't pass a position when determining if a target name is a literal.

The lastPos refers to a position in a different string.
This commit is contained in:
Stephen Kelly 2013-01-08 21:06:24 +01:00
parent f99196dc0c
commit cb1afbf466
1 changed files with 1 additions and 1 deletions

View File

@ -270,7 +270,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions(
}
const std::string targetName = input.substr(nameStartPos,
endPos - nameStartPos);
if(targetName.find("$<", lastPos) != input.npos)
if(targetName.find("$<") != input.npos)
{
errorString = "$<TARGET_NAME:...> requires its parameter to be a "
"literal.";