cmake: Invoke west topdir only with version >= 0.7.1

West version 0.7.0 introduced `west topdir` command.
Unfortunately version 0.7.0 would print the path in windows path style
when executed in Windows.

This commit ensure that `west topdir` is only used if west >= 0.7.1.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
Torsten Rasmussen 2020-02-10 15:07:51 +01:00 committed by Carles Cufí
commit 9dbc5eeb3b

View file

@ -38,7 +38,7 @@ else()
# even after output is one line.
message(STATUS "Found west: ${WEST} (found suitable version \"${west_version}\", minimum required is \"${MIN_WEST_VERSION}\")")
if (${west_version} VERSION_GREATER_EQUAL "0.7.0")
if (${west_version} VERSION_GREATER_EQUAL "0.7.1")
execute_process(
COMMAND ${WEST} topdir
OUTPUT_VARIABLE WEST_TOPDIR