| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
The placeholders for `CONFIGURATION` and `EFFECTIVE_PLATFORM_NAME` need
to be handled in the `WORKING_DIRECTORY` of custom commands just as we
already do for the `COMMAND`.
Fixes: #21483
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert commit 74b1c9fc8e (Explicitly specify language flag when source
LANGUAGE property is set, 2020-06-01, v3.19.0-rc1~722^2) and the lookup
tables from its two immediate ancestors. The purpose of that change was
to convert an explicit `LANGUAGE` source file property into an explicit
language specification compiler flag like `-x c`. This seems reasonable
since the property is documented as meaning "indicate what programming
language the source file is". It is also needed to help compilers deal
with non-standard source file extensions they don't recognize.
However, some projects have been setting `LANGUAGE C` on `.S` assembler
source files to mean "use the C compiler". Passing `-x c` for them
breaks the build because the `.S` sources are not written in C. These
projects should be updated to use `enable_language(ASM)`, for which
CMake often chooses the C compiler as the assembler when using
toolchains that support it (which would have to be the case for projects
using the approach).
Revert the change for now to preserve the old behavior for such projects.
We can re-introduce it with a policy in a future version of CMake.
Fixes: #21469
Issue: #14516, #20716
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Xcode has multiple levels of build settings with priority in descending
order:
1. Target
2. Project
3. Workspace
4. SDK defaults
`CMAKE_XCODE_ATTRIBUTE_*` path variables add these to project level, but
linked frameworks and libraries override this in target level. Add the
`$(inherited)` macro to keep both in the final list.
Fixes: #21387
|
|
|
|
|
|
|
|
|
|
|
| |
In commit e637744c51 (Xcode: Use "Link Binary With Libraries" to link
any library, 2019-07-10, v3.19.0-rc1~494^2~1) we accidentally added all
the library type files to "Link Binary With Libraries" build phase if
they were passed in as source files. Revert that change as any actually
linked libraries will be added to that build phase later in the
`AddDependAndLinkInformation` call.
Fixes: #21361
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
b6c60f14b6 macOS: Default to arm64 architecture on Apple Silicon hosts
383e81aa60 Tests: Teach RunCMake to ignore Xcode internal objc warnings
8f75912176 Tests: Enable Assembler test case when CMAKE_OSX_ARCHITECTURES has one value
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5291
|
| |
| |
| |
| |
| |
| |
| |
| | |
Detect `arm64` hardware using a method that pierces Rosetta. If
`CMAKE_OSX_ARCHITECTURES` is not set, pass explicit flags to the
toolchain to use `arm64` instead of letting the toolchain pick.
Fixes: #20989
|
|/ |
|
|
|
|
|
|
|
| |
The original Xcode build system did not properly re-link targets that consumed
object libraies. We worked around that with a post-build command on the object
libraries themselves that removed their consumers if out of date. The "new
build system" does not appear to need such help, so drop the workaround.
|
|
|
|
|
|
| |
The target has not been generated since commit d92d51429e (BUG: fix for bug
6193, fix xcode depend helper, 2008-01-10, v2.6.0~553). Remove it from
the list of special targets.
|
|
|
|
|
|
|
| |
Provide an option to switch back to the original build system via
`-T buildsystem=1`.
Fixes: #18088
|
|
|
|
|
|
| |
Extend the `-T <toolset>` option to support a `buildsystem=` field with
the Xcode generator. Add a `CMAKE_XCODE_BUILD_SYSTEM` variable to
inform project code about the selected build system variant.
|
| |
|
| |
|
|
|
|
|
| |
Move this up from `cmGlobalXCodeGenerator`. It will be useful for all
generators.
|
|\
| |
| |
| |
| |
| |
| | |
11425041f0 cmMakefile::GetDefinition: return cmProp
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5179
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not attach a custom command to a target if it is already attached to one of
the target's dependencies. The command's output will be available by the time
the target needs it because the dependency containing the command will have
already been built.
Since commit fb45559e09 (Xcode: Process targets in depth-first order during
generation, 2018-07-19, v3.13.0-rc1~293^2) we generate a target only after
generating its dependencies. Therefore when visiting the custom commands in a
target, we can assume that custom commands in its dependencies have already
been visited.
|
|/
|
|
| |
Compute and store the "real" dependencies earlier.
|
|
|
|
|
|
|
| |
OBJECT and STATIC libraries (framework or non-framework) do not use
this build phase. Not all items to be linked use this build phase either.
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
|
| |
|
|
|
|
| |
Support both STRING and OBJECT_LIST types in build setting attributes and make it possible to mix them
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
INTERFACE libraries were created with the intention of collecting usage
requirements for use by other targets via `target_link_libraries`.
Therefore they were not allowed to have SOURCES and were not included in
the generated buildsystem. In practice, this has become limiting:
* Header-only libraries do have sources, they just do not compile.
Developers should be able to edit those sources (the header files)
in their IDE.
* Header-only libraries may need to generate some of their header
files via custom commands.
Some projects work around these limitations by pairing each interface
library with an `add_custom_target` that makes the header files and
custom commands appear in the generated buildsystem and in IDEs.
Lift such limitations by allowing INTERFACE libraries to have SOURCES.
For those with sources, add a corresponding build target to the
generated buildsystem.
Fixes: #19145
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ef796cc743 cmGeneratorTarget: Skip computing link implementation for custom targets
45158b2afe cmGeneratorTarget: Simplify logic in ComputeLinkInterfaceLibraries
d6b1f5704e cmGeneratorTarget: Add missing nullptr checks
7695b67500 cmComputeTargetDepends: Add missing nullptr check
95b5df8646 cmGeneratorTarget: Skip computing languages for custom targets
2f0790df50 Factor out generator checks for filtering on non-compiling targets
422d9a0ab2 Factor out generator checks for filtering out interface libraries
bce82df0aa cmGeneratorTarget: Remove unnecessary target type check in dependency tracing
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !5038
|
| |
| |
| |
| |
| |
| | |
Add a `cmGeneratorTarget::IsInBuildSystem` helper method to tell
generators whether a target should participate in the generated build
system.
|
|\ \
| |/
|/|
| |
| |
| |
| | |
36fc3a1e84 Xcode: Suppress legacy build system deprecation warning
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5052
|
| |
| |
| |
| |
| |
| |
| |
| | |
Xcode 12 beta 3 now warns about using the legacy build system.
Since generation of the build system is CMake's responsibility,
the warning is not relevant to our users. Suppress it.
Issue: #18088
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
26673bf480 Xcode: Explicitly specify default native architecture on macOS
ce624cfbd4 cmGlobalXCodeGenerator: Save CMAKE_SYSTEM_NAME in member
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5023
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When `CMAKE_OSX_ARCHITECTURES` is not specified, we add the Xcode
setting `ONLY_ACTIVE_ARCH = YES` with the intention of targeting the
native architecture of the host. However, the default `ARCHS` value
chosen by "Xcode 12 Universal Apps" includes multiple architectures.
Add an explicit `ARCHS` setting with value `$(NATIVE_ARCH_ACTUAL)`
to tell Xcode to use the host's native architecture only.
Fixes: #20893
|
| |/ |
|
| |
| |
| |
| | |
Fixes: #18407, #20571, #20688
|
| |
| |
| |
| | |
Always refer to framework directory instead of binary directly.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add external libraries as fileRefs to Xcode project and add those
references to Link Binary With Libraries build phase. This allows
linking .a, .o, .dylib, .framework and .tbd libraries through "Link
Binary With Libraries" build phase, as opposed to `OTHER_LINKER_FLAGS`.
This improves on the approach added by commit 58c05e1c73 (Xcode: Use
"Link Binary With Libraries" build phase when possible, 2020-06-12).
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
7a969fe21d cmMakefile: Refactor API to better handle empty config values
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4957
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| | |
When OBJC or OBJCXX is enabled as a language, prefer that for .m and .mm
source file language selection.
Fixes: #20257
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| | |
* Instead of `classes` use name `commonSourceFiles`.
* No need for reference when you have pointer.
|
|/
|
|
| |
Fixes: #14516, #20716
|
|
|
|
| |
Combines cmMakefile:GetDefinition() and cmExpandList()
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
e64fa5f1b6 cmSourceFile::GetProperty: return cmProp
fc223f9860 cmGlobalXCodeGenerator: Fix genex interpreter overloads
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4603
|
| | |
|
| |
| |
| |
| |
| |
| | |
Overload both signatures to add Xcode-specific functionality.
Co-Author: Vitaly Stakhovsky <vvs31415@gitlab.org>
|