diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-07-24 19:02:21 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-08-01 14:06:02 (GMT) |
commit | e166bbef7bd8fa59c427911d96f41cd8a305af75 (patch) | |
tree | 340561c09efcf7c7f26628837b7ca15f7334d539 /Source/cmGlobalXCodeGenerator.cxx | |
parent | 17dcd9424aefdfa10b72ad3d3bfe35e186cad02b (diff) | |
download | CMake-e166bbef7bd8fa59c427911d96f41cd8a305af75.zip CMake-e166bbef7bd8fa59c427911d96f41cd8a305af75.tar.gz CMake-e166bbef7bd8fa59c427911d96f41cd8a305af75.tar.bz2 |
cmComputeLinkInformation: prepare Item consumers for `OBJECT` libraries
After b665966933 (cmComputeLinkInformation: track `OBJECT` library
dependencies, 2023-07-22), introduced in !8645 as a fix for #25112,
`OBJECT` libraries were tracked in a separate member to reduce the risk
of further regressions. This commit prepares consumers to handle
`OBJECT` libraries once they start appearing as link items.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index da9d6ce..9834b64 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3598,6 +3598,13 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) continue; } for (auto const& libItem : cli->GetItems()) { + // Explicitly ignore OBJECT libraries as Xcode emulates them as static + // libraries without an artifact. Avoid exposing this to the rest of + // CMake's compilation model. + if (libItem.Target && + libItem.Target->GetType() == cmStateEnums::OBJECT_LIBRARY) { + continue; + } // We want to put only static libraries, dynamic libraries, frameworks // and bundles that are built from targets that are not imported in "Link // Binary With Libraries" build phase. Except if the target property |