Skip to content

Commit

Permalink
Fix FindROOT.cmake to work with v6.30.00
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf authored and ChristianTackeGSI committed Nov 16, 2023
1 parent 416b22d commit db27083
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/modules/FindROOT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ If(ROOT_CONFIG_EXECUTABLE)

# extract major, minor, and patch versions from
# the version string given by root-config
String(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+.*" "\\1" ROOT_VERSION_MAJOR "${ROOT_VERSION_STRING}")
String(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" ROOT_VERSION_MINOR "${ROOT_VERSION_STRING}")
String(REGEX REPLACE "^[0-9]+\\.[0-9][0-9]+\\/([0-9][0-9]+).*" "\\1" ROOT_VERSION_PATCH "${ROOT_VERSION_STRING}")
String(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+[\\/.][0-9][0-9]+.*" "\\1" ROOT_VERSION_MAJOR "${ROOT_VERSION_STRING}")
String(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+[\\/.][0-9][0-9]+.*" "\\1" ROOT_VERSION_MINOR "${ROOT_VERSION_STRING}")
String(REGEX REPLACE "^[0-9]+\\.[0-9][0-9]+[\\/.]([0-9][0-9]+).*" "\\1" ROOT_VERSION_PATCH "${ROOT_VERSION_STRING}")

if(NOT ROOT_FIND_VERSION_MAJOR)
set(ROOT_FIND_VERSION_MAJOR 0)
Expand Down

0 comments on commit db27083

Please sign in to comment.