Commit Graph

6 Commits

Author SHA1 Message Date
Sebastian Bøe 56d144cd70 cmake: Fixed python detection bug
Fixed a bug where an old version of python on path would break the
python detection mechanism.

This fixes #12066

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-21 11:13:03 +01:00
Mark Ruvald Pedersen 0efad5f7fd cmake: Whitespace and commentary fixes
Cosmetics, no functional change expected.
Fixed leading space alignment.
Replaced tabs with spaces.
Emulation error message output is now aligned.

To locate tabs in cmake, the following bash is useful:
grep -PRil "\t" * | grep -i cmake | grep -v ^sanity

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
2018-12-20 12:23:50 +01:00
Sebastian Bøe 8077b10165 cmake: PythonInterp: Fixed a bug related to python detection
Fixed #11980, a bug where a build failure occured when 'python' was
not on path.

There was a bug in the implementation where it failed to detect that
'python' was not on path. This is now fixed.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-11 12:26:48 +01:00
Sebastian Bøe 9de5bc9109 cmake: FindPythonInterp: Prioritize 'python' from path the highest
Users expect that not just "some" compatible python is detected, but
also that it will be the 'python' executable from PATH, at least when
this executable is valid.

To this end rewrite FindPythonInterp to give this executable the
highest priority.

This fixes #11857

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-07 11:33:17 -05:00
Sebastian Bøe 985b93a367 cmake: Fix python version detection
The 'FindPythonInterp' that is distributed with CMake 3.8 is affected
by bug: https://github.com/zephyrproject-rtos/zephyr/issues/11103

To work around this, until we upgrade to 3.13, we copy and patch the
3.8 version of 'FindPythonInterp' into the Zephyr repository.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-11-20 19:37:57 +01:00
Sebastian Bøe db63841210 cmake: Copy CMake's FindPythonInterp.cmake into the repo
Copy the 3.8.2 version of FindPythonInterp.cmake into the repo so that
we can patch it and fix #11103.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-11-20 19:37:57 +01:00