summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Xcode: ensure framework with custom output directory can be consumedMarc Chevrier2022-10-141-5/+13
| | | | Fixes: #24046
* Merge topic 'ci-xcode-14.0'Brad King2022-10-031-2/+7
|\ | | | | | | | | | | | | | | | | 9cdf4c9be4 gitlab-ci: update macOS jobs to use Xcode 14.0 5d2c2b2558 Tests: Update RunCMake.XcodeProject iOS cases for Xcode 14.0 12c6fec6b4 Xcode: Drop CMAKE_INTDIR= definition in Swift targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7732
| * Xcode: Drop CMAKE_INTDIR= definition in Swift targetsBrad King2022-09-301-2/+7
| | | | | | | | | | Xcode 14.0 warns that Swift doesn't support definition values. Therefore `CMAKE_INTDIR` is not useful to Swift sources. Drop it.
* | Xcode: Fix "clean" operation under the "new build system"Brad King2022-09-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously we set `SYMROOT` to tell Xcode where to place the build products. However, the "clean" operation in the Xcode "new build system" expects that only Xcode creates the `SYMROOT` directory or contents inside it. Since we create that directory, "clean" fails. We now explicitly set `CONFIGURATION_BUILD_DIR` and `TARGET_TEMP_DIR` instead of letting Xcode compute their values from `SYMROOT`, so we no longer need to set the latter. Drop the now-unnecessary `SYMROOT`. Fixes: #22550
* | Xcode: Set object file locations using TARGET_TEMP_DIRBrad King2022-09-291-26/+12
| | | | | | | | | | | | This avoids relying on `SYMROOT` to locate the object files. Issue: #22550
* | Xcode: Set build product locations using CONFIGURATION_BUILD_DIRBrad King2022-09-291-11/+13
| | | | | | | | | | | | | | | | | | | | Since commit 59a2265576 (Xcode: Use EFFECTIVE_PLATFORM_NAME reference in ComputeOutputDir, 2011-08-12, v2.8.6~43^2~1) we can now set the build products path using `CONFIGURATION_BUILD_DIR` unconditionally because we compute the correct value even when using `EFFECTIVE_PLATFORM_NAME`. This avoids relying on `SYMROOT` to locate the build products. Issue: #22550
* | cmGlobalXCodeGenerator: Remove unused local variable settingsBrad King2022-09-291-4/+0
| |
* | Genex LINK_LIBRARY: Add support for framework with postfixMarc Chevrier2022-09-211-19/+17
| |
* | Merge topic 'xcode-lib-dirs'Brad King2022-09-161-2/+8
|\ \ | | | | | | | | | | | | | | | | | | d4cc39842e Xcode: Do not append per-config suffixes to library search paths Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7672
| * | Xcode: Do not append per-config suffixes to library search pathsMikko Sivulainen2022-09-151-2/+8
| | | | | | | | | | | | | | | | | | | | | Add policy `CMP0142` to remove the automatic addition of the `$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)` suffix in a compatible way. Fixes: #21757
* | | Merge topic 'link-framework-with-multi-config-postfix'Brad King2022-09-151-3/+11
|\ \ \ | |/ / |/| / | |/ | | | | | | fc06450ff4 Apple: Fix regression when linking a framework with postfix Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7675
| * Apple: Fix regression when linking a framework with postfixMarc Chevrier2022-09-141-3/+11
| | | | | | | | | | | | | | Fix a regression caused by commit 40178f3c90 (cmGlobalGenerator: Add helper to split framework path, 2022-02-10, v3.24.0-rc1~661^2~1). Fixes: #23961
* | Merge branch 'backport-3.24-Link-MACOSX_BUNDLE' into Link-MACOSX_BUNDLEMarc Chevrier2022-08-311-0/+1
|\ \ | |/
| * Xcode: Fix erroneous MACOSX_BUNDLE linkMarc Chevrier2022-08-311-0/+1
| | | | | | | | | | | | | | | | Refactoring in commit a2cfa2da4f (GenEx/LINK_LIBRARY: Add features for framework support on Apple, 2022-02-10, v3.24.0-rc1~661^2) accidentally removed a `GetParentDirectory` call. Restore it. Fixes: #23891
* | xcode: Don't set INSTALL_PATH unless target is SHARED_LIBRARYTor Arne Vestbø2022-08-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An empty INSTALL_PATH will confuse Xcode, resulting in the archive action producing archives that can not be uploaded to the App Store. The logic to pull out a install_name_dir only applies to SHARED_LIBRARY targets, so we can skip the setting of the property for all other targets. There might be cases where the INSTALL_PATH code path will also end up setting an empty INSTALL_PATH, but it's unclear whether this is a problem, so to keep the patch minimal the existing code is left as is. Fixes: #15183
* | CUDA: Add Device LTO support for nvccRobert Maynard2022-07-221-2/+2
| | | | | | | | Fixes #22200
* | Xcode: Pass compile definitions to SwiftDavid Geldreich2022-07-071-0/+12
| | | | | | | | | | | | | | | | | | | | correct Xcode generator Swift definitions original code was defining GCC_PREPROCESSOR_DEFINITIONS which is valid only for C languages add definitions to SWIFT_ACTIVE_COMPILATION_CONDITIONS when Swift language is used in the target add test in SwiftOnly for old Xcode (<8.0), append defines to cflags so it ends up in OTHER_SWIFT_FLAGS Fixes: #23637
* | cmTarget: add support for C++ module fileset typesBen Boeckel2022-06-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C++ modules have two variants which are of importance to CMake: - `CXX_MODULES`: interface modules (those using `export module M;`, `export module M:part;`, or `module M:internal_part;`) - `CXX_MODULE_HEADER_UNITS`: importable header units Creating C++ modules or partitions are *not* supported in any other source listing. This is because the source files must be installed (so their scope matters), but not part of usage requirements (what it means for a module source to be injected into a consumer is not clear at this moment). Due to the way `FILE_SET` works with scopes, they are a perfect fit as long as `INTERFACE` is not allowed (which it is not).
* | cmGlobalXCodeGenerator: avoid unused parameter warningsBen Boeckel2022-06-141-0/+4
|/
* cmSystemTools: Fix 'ErrorOccurred' spellingFeRD (Frank Dana)2022-06-131-1/+1
| | | | | | | | Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to 's_ErrorOccurred' and 's_FatalErrorOccurred', respectively. Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and 'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
* Xcode: Check for multiple `OSX_ARCHITECTURES` on targetHyper Nova Sun2022-04-111-3/+21
| | | | | | | | When determining a given target's object directory, also check for its `OSX_ARCHITECTURES` before resorting to global defaults. This fixes inconsistent object library references when: - `CMAKE_OSX_ARCHITECTURES` is unset or singular - but the object library's `OSX_ARCHITECTURES` property is set to multiple archs
* cmTarget: Add `HasKnownObjectFileLocation()` shorthandHyper Nova Sun2022-04-111-1/+1
| | | | | | | | Allow `cmGlobalGenerator`s to decide `HasKnownObjectFileLocation()` per given `cmTarget` - `cmGlobalGenerator::HasKnownObjectFileLocation()` now takes an optional `cmGeneratorTarget` - `cmTarget::HasKnownObjectFileLocation()` added as a shorthand
* xcode: add support for xcconfig filesGregor Jasny2022-04-031-0/+78
| | | | Fixes: #18420
* LINK_LIBRARIES: Evaluate separately for linking and usage requirementsBrad King2022-03-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | We evaluate `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` for two purposes: * Constructing the link line. * Collecting usage requirements. We evaluate `INTERFACE_LINK_LIBRARIES` separately for each purpose in order to support the `$<LINK_ONLY:...>` generator expression used to express private link dependencies of a static library. Previously we only evaluated `LINK_LIBRARIES` for linking, and used that result for collecting usage requirements too. Therefore `$<LINK_ONLY:...>` does not work in `LINK_LIBRARIES`. With the introduction of `INTERFACE_LINK_LIBRARIES_DIRECT`, evaluation of `LINK_LIBRARIES` now needs to distinguish these two cases in order to honor link dependencies encountered through `$<LINK_ONLY:...>` without also exposing other usage requirements through private dependencies of a static library. Revise internal infrastructure to distinguish the two cases when evaluating `LINK_LIBRARIES`. Make the information available in code paths for `INTERFACE_LINK_LIBRARIES_DIRECT` and `LINK_ONLY`. Defer actually using the information to later commits. Issue: #22496
* Xcode: Fix support for source tree symlink inside build treeBrad King2022-02-281-4/+6
| | | | | | | | | | | Since commit 61495cdaae (Fix Xcode project references to the source tree, 2009-09-22, v2.8.0~43) we force source file references to use relative paths from the source tree. If the source tree path is a symbolic link inside the build tree, the relative `../` sequence goes to the wrong place. The problem with debug breakpoints motivating that change does not seem to occur in modern Xcode versions, so update the logic to use a relative path only when it does not need to start in any `../` sequence.
* GenEx/LINK_LIBRARY: Add features for framework support on AppleMarc Chevrier2022-02-151-21/+25
|
* cmGlobalGenerator: Add helper to split framework pathMarc Chevrier2022-02-131-38/+16
| | | | | cmComputeLinkInformation and cmGlobalXCodeGenerator now rely on this method to handle framework paths.
* Genex: Add $<LINK_LIBRARY:...>Marc Chevrier2022-02-071-1/+3
| | | | | | | | This generator expression offers the capability, for the link step, to decorate libraries with prefix/suffix flags and/or adding any specific flag for each library. Fixes: #22812, #18751, #20078, #22703
* cmBuildOptions: Split build arguments into separate object.Carsten Rudolph2022-01-221-1/+1
|
* Xcode: Properly identify frameworks with system includesGregor Jasny2021-12-221-1/+1
| | | | | | | | Check the complete include path for being a system include, not the derived framework search path. The code for Ninja and Makefile generators does exactly the same. Fixes: #23011
* cmLocalGenerator: Simplify Add{Custom,Utility}CommandNAKAMURA Takumi2021-11-181-16/+17
|
* cmCustomCommand: Move constructor arguments to individual settersNAKAMURA Takumi2021-11-181-5/+6
| | | | | | | | Make `cmCustomCommand` have just only default constructor. Use each setter instead. This follows the builder pattern. Introduce `cc::SetOutputs(std::string output)`. This will be used later, as substitution for `cc::SetOutputs({output})`.
* Source: Fix IWYU warnings in Xcode generatorsNAKAMURA Takumi2021-11-161-3/+10
|
* Xcode: Add embedded plugins optionGusts Kaksis2021-11-101-0/+9
|
* Source: fix many -Wmissing-prototypes warnings by marking functions staticSean McBride2021-10-251-2/+2
|
* Merge topic 'xcode-dead-code'Brad King2021-09-291-3/+0
|\ | | | | | | | | | | | | | | b8a2ce0484 cmGlobalXCodeGenerator: Remove dead buildsystem version check Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Merge-request: !6568
| * cmGlobalXCodeGenerator: Remove dead buildsystem version checkBrad King2021-09-281-3/+0
| | | | | | | | | | | | | | | | | | In commit 8d5f4c4db9 (Xcode: Switch to the "new build system" for Xcode 12 and above, 2020-09-14, v3.19.0-rc1~143^2~7) we accidentally added code in an `else` block that under the opposite condition by which the block can be entered. Remove it. Fixes: #22681
* | Xcode: Treat .inl files as C++ header filesJake Turner2021-09-281-1/+1
|/ | | | | Generate the `explicitFileType` as `sourcecode.cpp.h` instead of just `sourcecode`. This enables syntax highlighting in Xcode.
* Rename cmProp in cmValueMarc Chevrier2021-09-211-29/+29
|
* Xcode: add support for embedding dynamic librariesLucas SOLTIC2021-09-131-2/+5
|
* Use new AddCacheEntry signaturesMarc Chevrier2021-09-101-3/+2
|
* Refactor: Use new SetProperty signaturesMarc Chevrier2021-08-251-1/+1
|
* Merge topic 'xcode13-old-buildsystem'Brad King2021-07-071-1/+5
|\ | | | | | | | | | | | | 71a2664ebb Xcode: Ignore deprecated build system Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6309
| * Xcode: Ignore deprecated build systemGregor Jasny2021-07-061-1/+5
| | | | | | | | | | With Xcode 13 the key to suppress the check has changed. Tested with Xcode 12.5 and 13.0-beta2.
* | cmMakefile: Add helper to initialize CMAKE_CONFIGURATION_TYPESBrad King2021-06-301-8/+1
|/ | | | | Factor out duplicate code from the Ninja Multi-Config, Visual Studio, and Xcode generators.
* cmComputeLinkInformation: Improve type safety of item IsPath memberBrad King2021-05-291-3/+5
| | | | Use an enum to avoid implicit conversions to bool.
* cmLocalGenerator: Factor out relative path conversion helpersBrad King2021-05-131-2/+1
| | | | | | Most calls to `MaybeConvertToRelativePath` use one of our common work directories (e.g. top of the build tree) as the local path. Add helpers for each of the common cases to simplify and clarify call sites.
* cmGlobalXCodeGenerator: Simplify relative path conversion under project rootBrad King2021-05-121-10/+4
|
* Merge topic 'xcode-inherited-params'Brad King2021-05-121-0/+3
|\ | | | | | | | | | | | | dfaf55fbfd Xcode: add extra '$(inherited)' entries using InheritBuildSettingAttribute. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6077
| * Xcode: add extra '$(inherited)' entries using InheritBuildSettingAttribute.Danny Parker2021-05-051-0/+3
| | | | | | | | | | | | | | | | | | These have been added to: GCC_PREPROCESSOR_DEFINITIONS OTHER_CFLAGS OTHER_LDFLAGS This is to allow Cocoapods to work correctly as it uses xcconfig files to alter build settings in Xcode, and requires these build settings to inherit from their parent, not overwrite.