diff --git a/cmake/modules/SetROOTVersion.cmake b/cmake/modules/SetROOTVersion.cmake index d37b9150f04bc..fe14f287e5195 100644 --- a/cmake/modules/SetROOTVersion.cmake +++ b/cmake/modules/SetROOTVersion.cmake @@ -82,7 +82,9 @@ function(SET_ROOT_VERSION) if (${GIT_DESCRIBE_ALL} MATCHES "^tags/") string(REGEX REPLACE "^tags/" "" GIT_DESCRIBE_ALWAYS ${GIT_DESCRIBE_ALL}) else() - message(WARNING "GIT_DESCRIBE_ALL is `${GIT_DESCRIBE_ALL}` with a format unexpected for tags. Not setting the commit.") + set(ROOT_GIT_VERSION "${ROOT_MAJOR_VERSION}-${ROOT_MINOR_VERSION}-${ROOT_PATCH_VERSION}") + set(GIT_DESCRIBE_ALL "tags/${ROOT_GIT_VERSION}") + set(GIT_DESCRIBE_ALWAYS ${ROOT_GIT_VERSION}) endif() endif()