From b1f12f8042ef0d7b190c04644905d3b3a325d4ae Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 22 Nov 2011 17:20:23 -0500 Subject: [PATCH] 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. --- Source/cmTargetLinkLibrariesCommand.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 0db5943bb..36c4ca8bd 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -217,8 +217,8 @@ bool cmTargetLinkLibrariesCommand // Use of any of the new keywords implies awareness of // this property. And if no libraries are named, it should // result in an empty link interface. - if((this->CurrentProcessingState != ProcessingLinkLibraries) - && !this->Target->GetProperty("LINK_INTERFACE_LIBRARIES")) + if(this->CurrentProcessingState != ProcessingLinkLibraries && + !this->Target->GetProperty("LINK_INTERFACE_LIBRARIES")) { this->Target->SetProperty("LINK_INTERFACE_LIBRARIES", ""); } @@ -249,9 +249,9 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib, { this->Makefile ->AddLinkLibraryForTarget(this->Target->GetName(), lib, llt); - if (this->CurrentProcessingState != ProcessingPublicInterface - || this->CurrentProcessingState == ProcessingPrivateInterface) + if (this->CurrentProcessingState != ProcessingPublicInterface) { + // Not LINK_INTERFACE_LIBRARIES or LINK_PUBLIC, do not add to interface. return; } }