Skip to content

Commit

Permalink
[cmake] Avoid warning when building from tar file
Browse files Browse the repository at this point in the history
Use the ROOT version from file when building from the source tar file
Fixes root-project#15178
  • Loading branch information
bellenot committed Aug 14, 2024
1 parent 8420def commit ae238c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/modules/SetROOTVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit ae238c6

Please sign in to comment.