zephyr/cmake
Torsten Rasmussen 94de3e9f60 cmake: FindPython3: Adjust python3 program search
Fixes: #24340

Using find_package(Python3 3.6) will select the highest available
python3.

This means that in case user has:
/usr/bin/python  --> python2.7
/usr/bin/python3 --> python3.6
/usr/bin/python3.6
/usr/bin/python3.8

then CMake will choose python 3.8.
This commit changes that behavior, so that in the above scenario, then
Python 3.6 will be preferred.

It also adds the following, python will be preferred over python3, if
both meets the minimum requirement.
For example:
/usr/bin/python  --> python3.6
/usr/bin/python3 --> python3.7
then Python 3.6 is prefered.

It further introduces PYTHON_PREFER variable, which can be used to
further control the behavior.
As example -DPYTHON_PREFER=python3.7 will choose Python 3.7 if
installed.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-04-16 07:43:14 -04:00
..
app cmake: board alias message when hiding existing board 2020-04-09 14:38:36 +02:00
bintools
compiler arch: arm: Remove extraneous root cmake files 2020-04-15 11:23:56 +02:00
emu
flash cmake: fix bug in generated runners.yaml 2020-04-09 14:04:27 +02:00
ide
linker/ld
makefile_exports
reports
toolchain
usage
util
boards.cmake
ccache.cmake
cfb.cmake
dts.cmake cmake: re-run if gen_defines changes 2020-04-13 08:22:46 -05:00
extensions.cmake boards: nrf52_pca10040: Rename to nrf52dk_nrf52832 2020-04-06 13:09:07 +02:00
extra_flags.cmake
gcc-m-cpu.cmake
generic_toolchain.cmake
git.cmake
hex.cmake
host-tools.cmake
kconfig.cmake cmake: kconfig: pass EXTRA_DTC_FLAGS to kconfig for EDT init 2020-04-16 06:07:24 -05:00
kobj.cmake
pristine.cmake
python.cmake cmake: FindPython3: Adjust python3 program search 2020-04-16 07:43:14 -04:00
target_toolchain.cmake
version.cmake
zephyr_module.cmake