mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 12:19:54 -05:00
FindPython: enforce artifacts consistency when cross-compiling
Fixes: #26696
This commit is contained in:
@@ -48,6 +48,21 @@ If no ``COMPONENTS`` are specified, ``Interpreter`` is assumed.
|
||||
If component ``Development`` is specified, it implies sub-components
|
||||
``Development.Module`` and ``Development.Embed``.
|
||||
|
||||
.. versionchanged:: 4.1
|
||||
In a cross-compiling mode (i.e. the :variable:`CMAKE_CROSSCOMPILING` variable
|
||||
is defined to true), the following constraints, when the policy
|
||||
:policy:`CMP0190` is set to ``NEW``, now apply to the requested components:
|
||||
|
||||
* ``Interpreter`` or ``Compiler`` alone: the host artifacts will be searched.
|
||||
* ``Interpreter`` or ``Compiler`` with ``Development`` or any sub-component:
|
||||
The target artifacts will be searched. In this case, the
|
||||
:variable:`CMAKE_CROSSCOMPILING_EMULATOR` variable must be defined and will
|
||||
be used to execute the interpreter or the compiler.
|
||||
|
||||
When both host and target artifacts are needed, two different calls to the
|
||||
:command:`find_package` command should be done. The
|
||||
``Python_ARTIFACTS_PREFIX`` variable can be helpful in this situation.
|
||||
|
||||
To ensure consistent versions between components ``Interpreter``, ``Compiler``,
|
||||
``Development`` (or one of its sub-components) and ``NumPy``, specify all
|
||||
components at the same time:
|
||||
|
||||
Reference in New Issue
Block a user