zephyr/share/zephyr-package
Torsten Rasmussen 8e929fd20c cmake: find_package to honor list of zephyr installations to prefer
This commit introduces ZEPHYR_PREFER which is a list that user can
specify when compiling an application.

This allows a user who has multiple Zephyr installations in the same
work-tree to provide a list of which Zephyr to prefer.

This is an extension to CMake VERSION field, as a user who is working
with multiple Zephyr installations could face a situation where multiple
Zephyr's is having same version, as example 2.2.99, in which case CMake
version is not sufficient.

Example, workspace looking as:
/projects/workspace/zephyr
/projects/workspace/zephyr-alternate
/projects/workspace/zephyr-wip
/projects/workspace/my_app

To prefer zephyr-alternate, then zephyr-wip the my_app/CMakeLists.txt
should look as:
set(ZEPHYR_PREFER "zephyr-alternate" "zephyr-wip")
find_package(Zephyr)

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-03-27 16:23:46 +01:00
..
cmake cmake: find_package to honor list of zephyr installations to prefer 2020-03-27 16:23:46 +01:00