summaryrefslogtreecommitdiff
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-02-07 16:49:11 -0500
committerBrad King <brad.king@kitware.com>2008-02-07 16:49:11 -0500
commit410d7b0f364e94ae53c2e1e99a3876c3199d4e44 (patch)
treed4b2e84f0a338186903dcb546fc73c0184ecf090 /Source/cmGlobalXCodeGenerator.cxx
parent732784c0bcdcf0c227107cf4f0077a8dc9ac8d44 (diff)
downloadcmake-410d7b0f364e94ae53c2e1e99a3876c3199d4e44.tar.gz
ENH: Avoid computing link information for static library targets. They do not link.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx45
1 files changed, 25 insertions, 20 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index ed1af6473c..c2b0558498 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2092,6 +2092,12 @@ void cmGlobalXCodeGenerator
}
}
+ // Skip link information for static libraries.
+ if(cmtarget->GetType() == cmTarget::STATIC_LIBRARY)
+ {
+ return;
+ }
+
// Loop over configuration types and set per-configuration info.
for(std::vector<std::string>::iterator i =
this->CurrentConfigurationTypes.begin();
@@ -2166,29 +2172,28 @@ void cmGlobalXCodeGenerator
}
// now add the link libraries
- if(cmtarget->GetType() != cmTarget::STATIC_LIBRARY)
- {
- std::string linkLibs;
- const char* sep = "";
- typedef cmComputeLinkInformation::ItemVector ItemVector;
- ItemVector const& libNames = cli.GetItems();
- for(ItemVector::const_iterator li = libNames.begin();
- li != libNames.end(); ++li)
+ {
+ std::string linkLibs;
+ const char* sep = "";
+ typedef cmComputeLinkInformation::ItemVector ItemVector;
+ ItemVector const& libNames = cli.GetItems();
+ for(ItemVector::const_iterator li = libNames.begin();
+ li != libNames.end(); ++li)
+ {
+ linkLibs += sep;
+ sep = " ";
+ if(li->IsPath)
{
- linkLibs += sep;
- sep = " ";
- if(li->IsPath)
- {
- linkLibs += this->XCodeEscapePath(li->Value.c_str());
- }
- else
- {
- linkLibs += li->Value;
- }
+ linkLibs += this->XCodeEscapePath(li->Value.c_str());
+ }
+ else
+ {
+ linkLibs += li->Value;
}
- this->AppendBuildSettingAttribute(target, "OTHER_LDFLAGS",
- linkLibs.c_str(), configName);
}
+ this->AppendBuildSettingAttribute(target, "OTHER_LDFLAGS",
+ linkLibs.c_str(), configName);
+ }
}
}