this appears to do the trick

This commit is contained in:
Robin Müller 2022-05-10 12:26:21 +02:00
parent 377c3325d2
commit 88cc8c46a1
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
1 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
include(FsfwHelpers)
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" FORCE)
list(GET FSFW_GIT_INFO 1 FSFW_VERSION)
list(GET FSFW_GIT_INFO 2 FSFW_SUBVERSION)
list(GET FSFW_GIT_INFO 3 FSFW_REVISION)
@ -456,9 +456,10 @@ add_custom_command(
COMMENT ${POST_BUILD_COMMENT}
)
# This causes the version file to be updated each time the sources change
add_custom_command(
TARGET ${LIB_FSFW_NAME}
PRE_BUILD
COMMAND touch ${FSFW_SOURCES_DIR}/FSFWVersion.h.in
COMMAND ${CMAKE_COMMAND} -E touch ${FSFW_SOURCES_DIR}/FSFWVersion.h.in
COMMENT "${MSG_PREFIX} Updating FSFWVersion.h"
)