mirror of
https://github.com/reactos/CMake.git
synced 2024-12-02 16:46:36 +00:00
Merge topic 'fix-TARGET_PROPERTY-extraction'
5daaa5c
Fix TARGET_PROPERTY target extractions.
This commit is contained in:
commit
2eb7cee117
@ -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)
|
||||
|
@ -164,6 +164,8 @@ set_property(TARGET testLibRequired APPEND PROPERTY
|
||||
$<BUILD_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired4,INTERFACE_INCLUDE_DIRECTORIES>>
|
||||
$<BUILD_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired5,INTERFACE_INCLUDE_DIRECTORIES>>
|
||||
$<INSTALL_INTERFACE:$<TARGET_PROPERTY:testLibIncludeRequired6,INTERFACE_INCLUDE_DIRECTORIES>>
|
||||
# Test that the below is non-fatal
|
||||
$<$<TARGET_DEFINED:not_a_target>:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>>
|
||||
)
|
||||
|
||||
set_property(TARGET testLibRequired APPEND PROPERTY
|
||||
|
Loading…
Reference in New Issue
Block a user