Skip to content
Permalink
Browse files

cmake: fix regex for west version check in host-tools.cmake

'west --version' output has the path to the west manifest directory.
If there is a semantic version string in this path name, it will
raise a false version check failure.

Signed-off-by: Thomas Stilwell <Thomas.Stilwell@nordicsemi.no>
  • Loading branch information...
thst-nordic authored and nashif committed May 16, 2019
1 parent e2b45e6 commit 538e12e5c38bec6e0cf2baf667257f8802e8bf01
Showing with 1 addition and 1 deletion.
  1. +1 −1 cmake/host-tools.cmake
@@ -25,7 +25,7 @@ else()
# via pypi, which will result in a single line of output.
string(REGEX REPLACE "\n" ";" west_version_output "${west_version_output}")
foreach(item ${west_version_output})
if("${item}" MATCHES ".*v([0-9]+[.][0-9]+[.][0-9]+)")
if("${item}" MATCHES "^[^\/\\]*v([0-9]+[.][0-9]+[.][0-9]+)")
set(west_version "${CMAKE_MATCH_1}")
if(${west_version} VERSION_LESS ${MIN_WEST_VERSION})
message(FATAL_ERROR "The detected west version is unsupported.\n\

0 comments on commit 538e12e

Please sign in to comment.
You can’t perform that action at this time.