Skip to content
Commit 79b1f89f authored by Martí Bolívar's avatar Martí Bolívar Committed by Carles Cufi
Browse files

cmake: west detection fixes and improvements



Starting with west 0.8, we will have a stable way to run west as a
python module. In west 0.7, we have an undocumented way.

Handle these two cases to override the WEST variable used by the build
system to run west inside the same python interpreter as the rest of
the build system. This makes it intuitive to shell out to west from
elsewhere in the build, without making people reimplement existing
commands in the west API when it is not necessary.

Do so for the 'west topdir' invocation in west.cmake as an example.

The check that looks for whether PYTHON_EXECUTABLE and WEST_PYTHON
match is also not working properly when symbolic links are in use.
Fix it by using REALPATH instead of ABSOLUTE in the
get_filename_component() calls.

Finally, print the error on a failed import that we expect to work.

Signed-off-by: default avatarMartí Bolívar <marti.bolivar@nordicsemi.no>
parent f62fef5a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment