zephyr/share/zephyr-package/cmake
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
..
CMakeLists.txt cmake: West extension command for Zephyr config package registration 2020-03-27 16:23:46 +01:00
ZephyrConfig.cmake cmake: find_package to honor list of zephyr installations to prefer 2020-03-27 16:23:46 +01:00
ZephyrConfigVersion.cmake cmake: Zephyr package now sets ZEPHYR_BASE as cmake cached variable 2020-03-27 16:23:46 +01:00
ZephyrUnittestConfig.cmake cmake: ZephyrUnittestConfig.cmake added 2020-03-27 16:23:46 +01:00
ZephyrUnittestConfigVersion.cmake cmake: ZephyrUnittestConfig.cmake added 2020-03-27 16:23:46 +01:00
pristine.cmake cmake: West extension command for Zephyr config package registration 2020-03-27 16:23:46 +01:00
zephyr_package_search.cmake cmake: find_package to honor list of zephyr installations to prefer 2020-03-27 16:23:46 +01:00