summaryrefslogtreecommitdiffstats
path: root/cmake/cmake.d/03-macros.cmake
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-11-23 19:09:13 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2018-10-15 18:22:48 +0200
commit799642211effc29e59002887796e649f27329e50 (patch)
treeaedb6109fab29c10540ce4fbe96ba97d25b93b7e /cmake/cmake.d/03-macros.cmake
parent53cedab982e3a877fda6b8e18d1d7209a201faaa (diff)
No failure if none tags found on project git repo
Change-Id: Idb46117feb860c84a14b6c256ee809e31546fd7c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/cmake.d/03-macros.cmake')
-rw-r--r--cmake/cmake.d/03-macros.cmake14
1 files changed, 9 insertions, 5 deletions
diff --git a/cmake/cmake.d/03-macros.cmake b/cmake/cmake.d/03-macros.cmake
index 71907af..aef5498 100644
--- a/cmake/cmake.d/03-macros.cmake
+++ b/cmake/cmake.d/03-macros.cmake
@@ -536,10 +536,14 @@ macro(project_closing_msg)
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}"
- )
+ if(${GIT_PROJECT_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()
+ else()
+ message(STATUS "${Yellow} Your git project repo doesn't have any version tags nor hosted by AGL gerrit infrastructure. Can't compare version between project and app-templates ${APP_TEMPLATES_VERSION} ${ColourReset}")
endif()
endmacro()