summaryrefslogtreecommitdiff
path: root/Source/cmGlobalXCodeGenerator.h
diff options
context:
space:
mode:
authorGusts Kaksis <gusts.kaksis@sonarworks.com>2020-06-12 14:56:43 +0300
committerBrad King <brad.king@kitware.com>2020-06-17 06:35:25 -0400
commit58c05e1c732bd832e3133c4acde722fdb3eabfb8 (patch)
tree4a46c07bb8b2450d40bb6c2d46ab409ea3ecab86 /Source/cmGlobalXCodeGenerator.h
parent927373b678f8f84a4b41a1f6d4cc4c05322f75f4 (diff)
downloadcmake-58c05e1c732bd832e3133c4acde722fdb3eabfb8.tar.gz
Xcode: Use "Link Binary With Libraries" build phase when possible
Try linking all target linked libraries through frameworks build phase instead of linker flags, thus letting Xcode manage build product paths correctly. Prevent adding duplicate entries to "Link Binary With Libraries" build phase. Add check for configuration-dependent linking - in case the library is not present in all configurations revert back to linker flags which are per-configuration. This does change the order of libraries linked, but that does not seem to matter for Apple linkers invoked by Xcode, even for static libraries. The linker will go back and re-consider a static library from earlier on the link line when more symbols from its objects are needed. Fixes: #14185
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.h')
-rw-r--r--Source/cmGlobalXCodeGenerator.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index f6fd9c57db..0fc65582c3 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -295,6 +295,7 @@ private:
std::map<std::string, cmXCodeObject*> TargetGroup;
std::map<std::string, cmXCodeObject*> FileRefs;
std::map<cmGeneratorTarget const*, cmXCodeObject*> XCodeObjectMap;
+ std::map<cmXCodeObject*, cmXCodeObject*> FileRefToBuildFileMap;
std::vector<std::string> Architectures;
std::string ObjectDirArchDefault;
std::string ObjectDirArch;