summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-22 12:18:34 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-07-22 12:18:43 (GMT)
commit827b498a02453b0c098ca3aac1bdc0519a90ac0b (patch)
treea3525cd2a7801e5fec0556dfba7d53014d75d73d
parentaaf3859e0ae8cff877862e2975319354ebb4d127 (diff)
parent59f2aa63e4aeb99b3c51a0325cc5f622b126444c (diff)
downloadCMake-827b498a02453b0c098ca3aac1bdc0519a90ac0b.zip
CMake-827b498a02453b0c098ca3aac1bdc0519a90ac0b.tar.gz
CMake-827b498a02453b0c098ca3aac1bdc0519a90ac0b.tar.bz2
Merge topic 'static-library-flags'
59f2aa63e4 Swift: fix static library handling Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3576
-rw-r--r--Source/cmLocalGenerator.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 4ffd6e0..d177278 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -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()) {