From 1687531ccb8b38cfe4202ff023f94147cb815f7a Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 17 Nov 2017 16:24:40 +0100 Subject: Check version between app-templates and project. PROJECT_VERSION could be detected if project is located in AGL gerrit repo or with personal tags when in personal repository This version is checked against app-templates version which is aligned on AGL tags. A warning is displayed if app-templates version is outdated related to project_version. Also a "dirty" flag is appended to the project version if git repo isn't in sync with its remote counterpart. Then you could know if see an installed widget on a target that got that "-dirty" flag appended to the version that this widget include code that could not be merged in the git repository. Bug-AGL: SPEC-951 Change-Id: I99687560d19d746c887fc7a095e71407bda34325 Signed-off-by: Romain Forlot --- cmake/cmake.d/03-macros.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cmake/cmake.d/03-macros.cmake') diff --git a/cmake/cmake.d/03-macros.cmake b/cmake/cmake.d/03-macros.cmake index e99208b..71907af 100644 --- a/cmake/cmake.d/03-macros.cmake +++ b/cmake/cmake.d/03-macros.cmake @@ -534,3 +534,12 @@ macro(project_closing_msg) ${PROJECT_TARGETS} populate) endif() endmacro() + +macro(check_version) + if(${GIT_PROJECT_VERSION} VERSION_GREATER ${APP_TEMPLATES_VERSION}) + message(STATUS "${Yellow}.. Your app-templates submodule version seems outdated. You should update it with 'git submodule update --remote ${PROJECT_APP_TEMPLATES_DIR}'. + - App-templates version: ${APP_TEMPLATES_VERSION} + - Project version according AGL Git tag: ${GIT_PROJECT_VERSION}" + ) + endif() +endmacro() -- cgit 1.2.3-korg