mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
Help: Remove recommendations for using CMAKE_CFG_INTDIR
Commit e71c4f7729
(CMAKE_CFG_INTDIR: Formally deprecate in favor of
$<CONFIG>, 2021-05-27) only updated the docs for CMAKE_CFG_INTDIR
itself, but other parts of the docs still used it. Update the other places
to avoid referring to the now-deprecated variable.
This commit is contained in:
@@ -68,26 +68,24 @@ architecture:
|
||||
# /path/to/somewhere/objects-iphonesimulator/x86_64/func.o
|
||||
|
||||
In some cases, you may want to have configuration-specific object files
|
||||
as well. The :variable:`CMAKE_CFG_INTDIR` variable can be a convenient
|
||||
way of capturing this in combination with the SDK:
|
||||
as well. The ``$(CONFIGURATION)`` Xcode variable is often used for this and
|
||||
can be used in conjunction with the others mentioned above:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
add_library(someObjs OBJECT IMPORTED)
|
||||
set_property(TARGET someObjs PROPERTY IMPORTED_OBJECTS
|
||||
"/path/to/somewhere/${CMAKE_CFG_INTDIR}/$(CURRENT_ARCH)/func.o"
|
||||
"/path/to/somewhere/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(CURRENT_ARCH)/func.o"
|
||||
)
|
||||
|
||||
# Example paths:
|
||||
# /path/to/somewhere/Release-iphoneos/arm64/func.o
|
||||
# /path/to/somewhere/Debug-iphonesimulator/x86_64/func.o
|
||||
|
||||
When any Xcode variable or :variable:`CMAKE_CFG_INTDIR` is used, CMake is
|
||||
not able to fully evaluate the path(s) at configure time. One consequence
|
||||
of this is that the configuration-specific
|
||||
:prop_tgt:`IMPORTED_OBJECTS_<CONFIG>` properties cannot be used, since
|
||||
CMake cannot determine whether an object file exists at a particular
|
||||
``<CONFIG>`` location. The ``IMPORTED_OBJECTS`` property must be used for
|
||||
these situations and the configuration-specific aspects of the path must be
|
||||
handled by using :variable:`CMAKE_CFG_INTDIR` or with another Xcode variable
|
||||
``$(CONFIGURATION)``.
|
||||
When any Xcode variable is used, CMake is not able to fully evaluate the
|
||||
path(s) at configure time. One consequence of this is that the
|
||||
configuration-specific :prop_tgt:`IMPORTED_OBJECTS_<CONFIG>` properties cannot
|
||||
be used, since CMake cannot determine whether an object file exists at a
|
||||
particular ``<CONFIG>`` location. The ``IMPORTED_OBJECTS`` property must be
|
||||
used for these situations and the configuration-specific aspects of the path
|
||||
should be handled by the ``$(CONFIGURATION)`` Xcode variable.
|
||||
|
@@ -6,5 +6,7 @@ Specifies the available build types on multi-config generators.
|
||||
This specifies what build types (configurations) will be available
|
||||
such as ``Debug``, ``Release``, ``RelWithDebInfo`` etc. This has reasonable
|
||||
defaults on most platforms, but can be extended to provide other build
|
||||
types. See also :variable:`CMAKE_BUILD_TYPE` for details of managing
|
||||
configuration data, and :variable:`CMAKE_CFG_INTDIR`.
|
||||
types.
|
||||
|
||||
See :variable:`CMAKE_BUILD_TYPE` for specifying the configuration with
|
||||
single-config generators.
|
||||
|
Reference in New Issue
Block a user