CMP0190 — CMake 4.3.0 Documentation

# CMP0190

Added in version 4.1.

Modules `FindPython3`, `FindPython2` and `FindPython` enforce consistency of artifacts in cross-compiling mode.

Starting with CMake 4.1, Modules `FindPython3`, `FindPython2` and `FindPython` apply, in cross-compiling mode (i.e. the `CMAKE_CROSSCOMPILING` variable is set to true), the following constraints 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 `CMAKE_CROSSCOMPILING_EMULATOR` variable must be defined and will be used to execute the interpreter or the compiler.

This policy provides compatibility with projects that expect the legacy behavior.

The `OLD` behavior for this policy does not enforce consistency in cross-compiling mode and will, potentially, returns a mix of artifacts (i.e. host and target artifacts).

This policy was introduced in CMake version 4.1. It may be set by `cmake_policy()` or `cmake_minimum_required()`. If it is not set, CMake does not warn, and uses `OLD` behavior.

Note

The `OLD` behavior of a policy is deprecated by definition and may be removed in a future version of CMake.