diff options
author | Gusts Kaksis <gusts.kaksis@sonarworks.com> | 2020-06-12 11:56:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-17 10:35:25 (GMT) |
commit | 58c05e1c732bd832e3133c4acde722fdb3eabfb8 (patch) | |
tree | 4a46c07bb8b2450d40bb6c2d46ab409ea3ecab86 /Source/cmGlobalXCodeGenerator.h | |
parent | 927373b678f8f84a4b41a1f6d4cc4c05322f75f4 (diff) | |
download | CMake-58c05e1c732bd832e3133c4acde722fdb3eabfb8.zip CMake-58c05e1c732bd832e3133c4acde722fdb3eabfb8.tar.gz CMake-58c05e1c732bd832e3133c4acde722fdb3eabfb8.tar.bz2 |
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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index f6fd9c5..0fc6558 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; |