diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 96e0aea0e8..63756b1a94 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -367,7 +367,6 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression( std::string::size_type lastPos = pos; cmMakefile *mf = target->GetMakefile(); - std::string errorString; while((pos = input.find("$AddTargetNamespace(targetName, target, missingTargets)) + if (this->AddTargetNamespace(targetName, target, missingTargets)) { - errorString = "$ requires " - "its first parameter to be a reachable target."; - break; + input.replace(nameStartPos, commaPos - nameStartPos, targetName); } - input.replace(nameStartPos, commaPos - nameStartPos, targetName); lastPos = pos + targetName.size(); } - if (!errorString.empty()) - { - mf->IssueMessage(cmake::FATAL_ERROR, errorString); - return; - } + std::string errorString; pos = 0; lastPos = pos; while((pos = input.find("$> $> $> + # Test that the below is non-fatal + $<$:$> ) set_property(TARGET testLibRequired APPEND PROPERTY