summaryrefslogtreecommitdiffstats
path: root/Source/cmExportFileGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-01-26 10:04:12 (GMT)
committerBrad King <brad.king@kitware.com>2013-01-29 15:56:09 (GMT)
commit5daaa5c48dc6066b5bb145aff30286cc63c12e81 (patch)
tree3570b98566d6f4dbaabc9a0205affbd55854f084 /Source/cmExportFileGenerator.cxx
parent48ab5050de1b60309744f894fd0e96b2db75b76f (diff)
downloadCMake-5daaa5c48dc6066b5bb145aff30286cc63c12e81.zip
CMake-5daaa5c48dc6066b5bb145aff30286cc63c12e81.tar.gz
CMake-5daaa5c48dc6066b5bb145aff30286cc63c12e81.tar.bz2
Fix TARGET_PROPERTY target extractions.
We need to make sure we can export targets which have content such as $<0:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES> That means making not finding a target non-fatal here.
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r--Source/cmExportFileGenerator.cxx14
1 files changed, 3 insertions, 11 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 96e0aea..63756b1 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("$<TARGET_PROPERTY:", lastPos)) != input.npos)
{
@@ -388,21 +387,14 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression(
std::string targetName = input.substr(nameStartPos,
commaPos - nameStartPos);
- if (!this->AddTargetNamespace(targetName, target, missingTargets))
+ if (this->AddTargetNamespace(targetName, target, missingTargets))
{
- errorString = "$<TARGET_PROPERTY:" + targetName + ",prop> 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("$<TARGET_NAME:", lastPos)) != input.npos)