mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-25 15:49:08 -05:00
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:
committed by
Brad King
parent
8d3b65346f
commit
14bbf8340a
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user