Skip to content

Commit

Permalink
[CMake] fix ROOT Version when using root-config
Browse files Browse the repository at this point in the history
root-config reports version as 6.26/10. This might also happen in other cases.
We now convert it to 6.26.10

Fixes #1378
  • Loading branch information
KrisThielemans committed Feb 13, 2024
1 parent 108748b commit b3ad8c4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cmake/FindCERN_ROOT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# @Author Nikos Efthimiou (nikos.efthimiou AT gmail.com)
# @Author Kris Thielemans
# @Author the ROOT team
# @Atuhor Rebert Twyman (improved documentation)
# @Author Robert Twyman (improved documentation)

## CMAKE ARGS
#
Expand Down Expand Up @@ -37,7 +37,7 @@

# This file contains lines from FindROOT.cmake distributed in ROOT 6.08.
# Therefore, this file is presumably licensed under the LGPL 2.1.
# New parts Copyright 2016, 2020, 2023 University College London
# New parts Copyright 2016, 2020, 2023, 2024 University College London

if (NOT DEFINED ROOTSYS)
set(ROOTSYS "$ENV{ROOTSYS}")
Expand Down Expand Up @@ -153,7 +153,11 @@ else()

endif()

# root-config reports version as 6.26/10. This might also happen in other cases. Convert it to 6.26.10
string(REPLACE "/" "." CERN_ROOT_VERSION "${CERN_ROOT_VERSION}")

if (CERN_ROOT_DEBUG)
message(STATUS "CERN_ROOT_VERSION: ${CERN_ROOT_VERSION}")
message(STATUS "CERN_ROOT_INCLUDE_DIRS: ${CERN_ROOT_INCLUDE_DIRS}")
message(STATUS "AVAILABLE ROOT LIBRARIES: ${CERN_ROOT_LIBRARIES}")
if (TARGET ROOT::Tree)
Expand Down

0 comments on commit b3ad8c4

Please sign in to comment.