cmake: modules: west: allow custom MIN_WEST_VERSION

Different users of the Zephyr CMake package may have different minimum
required versions of west. One important in-tree example is the
documentation, which must either be built with the latest version of
west, or with no west installed at all.

Make the MIN_WEST_VERSION variable configurable to support use cases
like this.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2023-03-08 10:36:27 -08:00 committed by Marti Bolivar
parent ef7a9af7e3
commit 0a1a5f8ab8

View file

@ -62,7 +62,7 @@ else()
# We can import west from PYTHON_EXECUTABLE and have its version.
# Make sure its version matches the minimum required one.
set(MIN_WEST_VERSION 0.7.1)
set_ifndef(MIN_WEST_VERSION 0.7.1)
if(${west_version} VERSION_LESS ${MIN_WEST_VERSION})
message(FATAL_ERROR "The detected west version, ${west_version}, is unsupported.\n\
The minimum supported version is ${MIN_WEST_VERSION}.\n\