Browse Source

Revert LINK_SEARCH_{START,END}_STATIC behavior change

The changes to cmComputeLinkInformation.cxx in commit 675ef165 (Allow
LINK_SEARCH_{START,END}_STATIC props to have default values, 2015-08-07)
are unrelated to the feature added by that change and are incorrect.
They lead to cases of extra -Bdynamic flags.  Revert them.
Brad King 10 years ago
parent
commit
9e21b01a4d
1 changed files with 3 additions and 5 deletions
  1. 3 5
      Source/cmComputeLinkInformation.cxx

+ 3 - 5
Source/cmComputeLinkInformation.cxx

@@ -522,10 +522,9 @@ bool cmComputeLinkInformation::Compute()
   // libraries are found.
   // libraries are found.
   const char* lss =
   const char* lss =
       this->Target->Target->GetProperty("LINK_SEARCH_END_STATIC");
       this->Target->Target->GetProperty("LINK_SEARCH_END_STATIC");
-  if(lss)
+  if(cmSystemTools::IsOn(lss))
     {
     {
-    this->SetCurrentLinkType(
-      cmSystemTools::IsOn(lss) ? LinkStatic : LinkShared);
+    this->SetCurrentLinkType(LinkStatic);
     }
     }
   else
   else
     {
     {
@@ -863,8 +862,7 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo()
   const char* lss =
   const char* lss =
       this->Target->Target->GetProperty("LINK_SEARCH_START_STATIC");
       this->Target->Target->GetProperty("LINK_SEARCH_START_STATIC");
   this->StartLinkType = cmSystemTools::IsOn(lss)? LinkStatic : LinkShared;
   this->StartLinkType = cmSystemTools::IsOn(lss)? LinkStatic : LinkShared;
-  this->CurrentLinkType = LinkUnknown;
-  this->SetCurrentLinkType(this->StartLinkType);
+  this->CurrentLinkType = this->StartLinkType;
 }
 }
 
 
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------