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 cmake: qemu: Support delayed expansion of QEMU_KERNEL_OPTION 2020-04-02 09:22:38 +02:00
flash cmake: fix bug in generated runners.yaml 2020-04-09 14:04:27 +02:00
ide
linker/ld cmake: using ${ZEPHYR_BASE} instead of $ENV{ZEPHYR_BASE} 2020-03-27 16:23:46 +01:00
makefile_exports cmake: Add option for exporting build metadata to Make 2020-01-23 15:09:12 -05:00
reports cmake: allow appending dependencies to report targets 2020-01-20 18:35:01 -05:00
toolchain cmake: toolchain: print what we find 2020-03-10 14:53:28 +02:00
usage cmake: ninja usage build target 2020-03-27 16:23:46 +01:00
util
boards.cmake scripts: west-commands: Updates needed when removing ZEPHYR_BASE env 2020-03-27 16:23:46 +01:00
ccache.cmake
cfb.cmake cmake: using ${ZEPHYR_BASE} instead of $ENV{ZEPHYR_BASE} 2020-03-27 16:23:46 +01:00
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 arch: arm64: Support aarch64-gcc compiler 2020-02-01 08:08:43 -05:00
generic_toolchain.cmake cmake: Introduce optional Kconfig for toolchains 2020-01-29 12:22:31 -06:00
git.cmake
hex.cmake
host-tools.cmake cmake: propagating zephyr base to west 2020-03-27 16:23:46 +01:00
kconfig.cmake cmake: kconfig: pass EXTRA_DTC_FLAGS to kconfig for EDT init 2020-04-16 06:07:24 -05:00
kobj.cmake cmake: using ${ZEPHYR_BASE} instead of $ENV{ZEPHYR_BASE} 2020-03-27 16:23:46 +01:00
pristine.cmake
python.cmake cmake: FindPython3: Adjust python3 program search 2020-04-16 07:43:14 -04:00
target_toolchain.cmake
version.cmake cmake: Added possibility to disable the printing of version 2020-03-27 16:23:46 +01:00
zephyr_module.cmake cmake: propagating zephyr base to west 2020-03-27 16:23:46 +01:00