Commit 827b498a authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'static-library-flags'

59f2aa63 Swift: fix static library handling
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3576
parents aaf3859e 59f2aa63
......@@ -1134,11 +1134,13 @@ void cmLocalGenerator::GetStaticLibraryFlags(std::string& flags,
std::string const& linkLanguage,
cmGeneratorTarget* target)
{
this->AppendFlags(
flags, this->Makefile->GetSafeDefinition("CMAKE_STATIC_LINKER_FLAGS"));
if (!config.empty()) {
std::string name = "CMAKE_STATIC_LINKER_FLAGS_" + config;
this->AppendFlags(flags, this->Makefile->GetSafeDefinition(name));
if (linkLanguage != "Swift") {
this->AppendFlags(
flags, this->Makefile->GetSafeDefinition("CMAKE_STATIC_LINKER_FLAGS"));
if (!config.empty()) {
std::string name = "CMAKE_STATIC_LINKER_FLAGS_" + config;
this->AppendFlags(flags, this->Makefile->GetSafeDefinition(name));
}
}
this->AppendFlags(flags, target->GetProperty("STATIC_LIBRARY_FLAGS"));
if (!config.empty()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment