|
|
@@ -84,15 +84,6 @@ bool cmTargetPropCommandBase::ProcessContentArgs(
|
|
|
this->SetError("called with invalid arguments");
|
|
|
return false;
|
|
|
}
|
|
|
- if (this->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY &&
|
|
|
- scope != "INTERFACE") {
|
|
|
- this->SetError("may only set INTERFACE properties on INTERFACE targets");
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (this->Target->IsImported() && scope != "INTERFACE") {
|
|
|
- this->SetError("may only set INTERFACE properties on IMPORTED targets");
|
|
|
- return false;
|
|
|
- }
|
|
|
|
|
|
++argIndex;
|
|
|
|
|
|
@@ -105,6 +96,17 @@ bool cmTargetPropCommandBase::ProcessContentArgs(
|
|
|
}
|
|
|
content.push_back(args[i]);
|
|
|
}
|
|
|
+ if (!content.empty()) {
|
|
|
+ if (this->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY &&
|
|
|
+ scope != "INTERFACE") {
|
|
|
+ this->SetError("may only set INTERFACE properties on INTERFACE targets");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (this->Target->IsImported() && scope != "INTERFACE") {
|
|
|
+ this->SetError("may only set INTERFACE properties on IMPORTED targets");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
return this->PopulateTargetProperies(scope, content, prepend, system);
|
|
|
}
|
|
|
|