target_link_libraries: Simplify argument processing state tests

Remove extra parens in test for not handling LINK_INTERFACE_LIBRARIES.
Remove redundant test for equality with ProcessingPrivateInterface
subsumed by test for inequality with ProcessingPublicInterface.
This commit is contained in:
Brad King 2011-11-22 17:20:23 -05:00
parent 5fc95dff46
commit b1f12f8042
1 changed files with 4 additions and 4 deletions

View File

@ -217,8 +217,8 @@ bool cmTargetLinkLibrariesCommand
// Use of any of the new keywords implies awareness of // Use of any of the new keywords implies awareness of
// this property. And if no libraries are named, it should // this property. And if no libraries are named, it should
// result in an empty link interface. // result in an empty link interface.
if((this->CurrentProcessingState != ProcessingLinkLibraries) if(this->CurrentProcessingState != ProcessingLinkLibraries &&
&& !this->Target->GetProperty("LINK_INTERFACE_LIBRARIES")) !this->Target->GetProperty("LINK_INTERFACE_LIBRARIES"))
{ {
this->Target->SetProperty("LINK_INTERFACE_LIBRARIES", ""); this->Target->SetProperty("LINK_INTERFACE_LIBRARIES", "");
} }
@ -249,9 +249,9 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
{ {
this->Makefile this->Makefile
->AddLinkLibraryForTarget(this->Target->GetName(), lib, llt); ->AddLinkLibraryForTarget(this->Target->GetName(), lib, llt);
if (this->CurrentProcessingState != ProcessingPublicInterface if (this->CurrentProcessingState != ProcessingPublicInterface)
|| this->CurrentProcessingState == ProcessingPrivateInterface)
{ {
// Not LINK_INTERFACE_LIBRARIES or LINK_PUBLIC, do not add to interface.
return; return;
} }
} }