Merge branch 'unknown-aliased-target' into compiler-features
This commit is contained in:
commit
059a6ca07a
|
@ -248,15 +248,14 @@ bool cmGetPropertyCommand::HandleTargetMode()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cmTarget* target = this->Makefile->FindTargetToUse(this->Name)) {
|
||||||
if (this->PropertyName == "ALIASED_TARGET") {
|
if (this->PropertyName == "ALIASED_TARGET") {
|
||||||
if (this->Makefile->IsAlias(this->Name)) {
|
if (this->Makefile->IsAlias(this->Name)) {
|
||||||
if (cmTarget* target = this->Makefile->FindTargetToUse(this->Name)) {
|
|
||||||
return this->StoreResult(target->GetName().c_str());
|
return this->StoreResult(target->GetName().c_str());
|
||||||
}
|
} else {
|
||||||
}
|
|
||||||
return this->StoreResult((this->Variable + "-NOTFOUND").c_str());
|
return this->StoreResult((this->Variable + "-NOTFOUND").c_str());
|
||||||
}
|
}
|
||||||
if (cmTarget* target = this->Makefile->FindTargetToUse(this->Name)) {
|
}
|
||||||
return this->StoreResult(
|
return this->StoreResult(
|
||||||
target->GetProperty(this->PropertyName, this->Makefile));
|
target->GetProperty(this->PropertyName, this->Makefile));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -24,23 +24,19 @@ bool cmGetTargetPropertyCommand::InitialPass(
|
||||||
std::string prop;
|
std::string prop;
|
||||||
bool prop_exists = false;
|
bool prop_exists = false;
|
||||||
|
|
||||||
|
if (cmTarget* tgt = this->Makefile->FindTargetToUse(targetName)) {
|
||||||
if (args[2] == "ALIASED_TARGET") {
|
if (args[2] == "ALIASED_TARGET") {
|
||||||
if (this->Makefile->IsAlias(targetName)) {
|
if (this->Makefile->IsAlias(targetName)) {
|
||||||
if (cmTarget* target = this->Makefile->FindTargetToUse(targetName)) {
|
prop = tgt->GetName();
|
||||||
prop = target->GetName();
|
|
||||||
prop_exists = true;
|
prop_exists = true;
|
||||||
}
|
}
|
||||||
}
|
} else if (!args[2].empty()) {
|
||||||
} else if (cmTarget* tgt = this->Makefile->FindTargetToUse(targetName)) {
|
const char* prop_cstr = tgt->GetProperty(args[2], this->Makefile);
|
||||||
cmTarget& target = *tgt;
|
|
||||||
const char* prop_cstr = CM_NULLPTR;
|
|
||||||
if (!args[2].empty()) {
|
|
||||||
prop_cstr = target.GetProperty(args[2], this->Makefile);
|
|
||||||
}
|
|
||||||
if (prop_cstr) {
|
if (prop_cstr) {
|
||||||
prop = prop_cstr;
|
prop = prop_cstr;
|
||||||
prop_exists = true;
|
prop_exists = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
bool issueMessage = false;
|
bool issueMessage = false;
|
||||||
std::ostringstream e;
|
std::ostringstream e;
|
||||||
|
|
Loading…
Reference in New Issue