Unify the way the flags of a static library are read

Introduce cmLocalGenerator::GetStaticLibraryFlags() to have a central
function for getting the linker flags for a given target.
This commit is contained in:
Patrick Gansterer
2013-07-10 19:11:04 +02:00
committed by Brad King
parent 8d3b65346f
commit 14bbf8340a
6 changed files with 45 additions and 60 deletions
+2 -6
View File
@@ -144,12 +144,8 @@ void cmMakefileLibraryTargetGenerator::WriteStaticLibraryRules()
}
std::string extraFlags;
this->LocalGenerator->AppendFlags
(extraFlags,this->Target->GetProperty("STATIC_LIBRARY_FLAGS"));
std::string staticLibraryFlagsConfig = "STATIC_LIBRARY_FLAGS_";
staticLibraryFlagsConfig += cmSystemTools::UpperCase(this->ConfigName);
this->LocalGenerator->AppendFlags
(extraFlags, this->Target->GetProperty(staticLibraryFlagsConfig.c_str()));
this->LocalGenerator->GetStaticLibraryFlags(extraFlags,
cmSystemTools::UpperCase(this->ConfigName), this->Target);
this->WriteLibraryRules(linkRuleVar.c_str(), extraFlags.c_str(), false);
}