mueller/extend-version-class-fork #69

Merged
meierj merged 17 commits from mueller/extend-version-class-fork into eive/develop 2022-04-22 20:06:50 +02:00
Showing only changes of commit 617d41c7d5 - Show all commits

View File

@ -47,11 +47,13 @@ set(FSFW_DUMMY_TGT fsfw-dummy)
project(${LIB_FSFW_NAME}) project(${LIB_FSFW_NAME})
add_library(${LIB_FSFW_NAME}) add_library(${LIB_FSFW_NAME})
set(FSFW_GIT_VER_HANDLING_OK FALSE)
# Version handling # Version handling
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
message(STATUS "${MSG_PREFIX} Determining version information with git") message(STATUS "${MSG_PREFIX} Determining version information with git")
include(FsfwHelpers) include(FsfwHelpers)
determine_version_with_git("--exclude" "docker_*") determine_version_with_git("--exclude" "docker_*")
if(GIT_INFO)
set(FSFW_GIT_INFO ${GIT_INFO} CACHE STRING "Version information retrieved with git describe") set(FSFW_GIT_INFO ${GIT_INFO} CACHE STRING "Version information retrieved with git describe")
list(GET FSFW_GIT_INFO 1 FSFW_VERSION) list(GET FSFW_GIT_INFO 1 FSFW_VERSION)
list(GET FSFW_GIT_INFO 2 FSFW_SUBVERSION) list(GET FSFW_GIT_INFO 2 FSFW_SUBVERSION)
@ -66,7 +68,12 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
if(NOT FSFW_REVISION) if(NOT FSFW_REVISION)
set(FSFW_REVISION ${FSFW_REVISION_IF_GIT_FAILS}) set(FSFW_REVISION ${FSFW_REVISION_IF_GIT_FAILS})
endif() endif()
else() set(FSFW_GIT_VER_HANDLING_OK TRUE)
else()
set(FSFW_GIT_VER_HANDLING_OK FALSE)
endif()
endif()
if(NOT FSFW_GIT_VER_HANDLING_OK)
set(FSFW_VERSION ${FSFW_VERSION_IF_GIT_FAILS}) set(FSFW_VERSION ${FSFW_VERSION_IF_GIT_FAILS})
set(FSFW_SUBVERSION ${FSFW_SUBVERSION_IF_GIT_FAILS}) set(FSFW_SUBVERSION ${FSFW_SUBVERSION_IF_GIT_FAILS})
set(FSFW_REVISION ${FSFW_REVISION_IF_GIT_FAILS}) set(FSFW_REVISION ${FSFW_REVISION_IF_GIT_FAILS})