diff --git a/cmake/version.cmake b/cmake/version.cmake index 08dc1e0d08e..f80a6799bae 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -61,7 +61,9 @@ endif() set(PROJECT_VERSION_STR ${PROJECT_VERSION}${PROJECT_VERSION_EXTRA_STR}) -message(STATUS "Zephyr version: ${PROJECT_VERSION_STR}") +if (NOT NO_PRINT_VERSION) + message(STATUS "Zephyr version: ${PROJECT_VERSION_STR} (${ZEPHYR_BASE})") +endif() set(MAJOR ${PROJECT_VERSION_MAJOR}) # Temporary convenience variable set(MINOR ${PROJECT_VERSION_MINOR}) # Temporary convenience variable diff --git a/share/zephyr-package/cmake/ZephyrConfigVersion.cmake b/share/zephyr-package/cmake/ZephyrConfigVersion.cmake index aca4713272d..9dedbca4941 100644 --- a/share/zephyr-package/cmake/ZephyrConfigVersion.cmake +++ b/share/zephyr-package/cmake/ZephyrConfigVersion.cmake @@ -29,6 +29,10 @@ endif() # Temporary set local Zephyr base to allow using version.cmake to find this Zephyr tree current version set(ZEPHYR_BASE ${CMAKE_CURRENT_LIST_DIR}/../../..) + +# Tell version.cmake to not print as printing version for all Zephyr installations being tested +# will lead to confusion on which is being used. +set(NO_PRINT_VERSION True) include(${ZEPHYR_BASE}/cmake/version.cmake) set(ZEPHYR_BASE)