Commit cb1afbf4 authored by Stephen Kelly's avatar Stephen Kelly

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

The lastPos refers to a position in a different string.
parent f99196dc
......@@ -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.";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment