Allow LINK_SEARCH_{START,END}_STATIC props to have default values.

Use the CMAKE_LINK_SEARCH_START_STATIC and CMAKE_LINK_SEARCH_END_STATIC
variables to initialize the LINK_SEARCH_START_STATIC and
LINK_SEARCH_END_STATIC target properties respectively.
This commit is contained in:
Chuck Atkins
2015-08-07 15:11:57 -04:00
committed by Brad King
parent 7a7922e020
commit 675ef165f2
10 changed files with 137 additions and 6 deletions
+5 -3
View File
@@ -522,9 +522,10 @@ bool cmComputeLinkInformation::Compute()
// libraries are found.
const char* lss =
this->Target->Target->GetProperty("LINK_SEARCH_END_STATIC");
if(cmSystemTools::IsOn(lss))
if(lss)
{
this->SetCurrentLinkType(LinkStatic);
this->SetCurrentLinkType(
cmSystemTools::IsOn(lss) ? LinkStatic : LinkShared);
}
else
{
@@ -862,7 +863,8 @@ void cmComputeLinkInformation::ComputeLinkTypeInfo()
const char* lss =
this->Target->Target->GetProperty("LINK_SEARCH_START_STATIC");
this->StartLinkType = cmSystemTools::IsOn(lss)? LinkStatic : LinkShared;
this->CurrentLinkType = this->StartLinkType;
this->CurrentLinkType = LinkUnknown;
this->SetCurrentLinkType(this->StartLinkType);
}
//----------------------------------------------------------------------------
+2
View File
@@ -306,6 +306,8 @@ void cmTarget::SetMakefile(cmMakefile* mf)
this->SetPropertyDefault("CXX_STANDARD", 0);
this->SetPropertyDefault("CXX_STANDARD_REQUIRED", 0);
this->SetPropertyDefault("CXX_EXTENSIONS", 0);
this->SetPropertyDefault("LINK_SEARCH_START_STATIC", 0);
this->SetPropertyDefault("LINK_SEARCH_END_STATIC", 0);
}
// Collect the set of configuration types.