Skip to content

Commit 201257f

Browse files
committed
Better message if root not installed
1 parent 593836d commit 201257f

1 file changed

Lines changed: 16 additions & 18 deletions

File tree

cmake/FindROOT.cmake

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
################################################################################
22
# Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
33
# #
4-
# This software is distributed under the terms of the #
5-
# GNU Lesser General Public Licence version 3 (LGPL) version 3, #
4+
# This software is distributed under the terms of the #
5+
# GNU Lesser General Public Licence version 3 (LGPL) version 3, #
66
# copied verbatim in the file "LICENSE" #
77
################################################################################
88
# - Find ROOT instalation
99
# This module tries to find the ROOT installation on your system.
10-
# It tries to find the root-config script which gives you all the needed
10+
# It tries to find the root-config script which gives you all the needed
1111
# information.
1212
# If the system variable ROOTSYS is set this is straight forward.
1313
# If not the module uses the pathes given in ROOT_CONFIG_SEARCHPATH.
14-
# If you need an other path you should add this path to this varaible.
14+
# If you need an other path you should add this path to this varaible.
1515
# The root-config script is then used to detect basically everything else.
1616
# This module defines a number of key variables and macros.
1717
#
1818
# Variables defined by this module:
1919
#
20-
# ROOT_FOUND System has ROOT, this means the root-config
20+
# ROOT_FOUND System has ROOT, this means the root-config
2121
# executable was found.
2222
#
2323
# ROOT_INCLUDE_DIR ROOT include directories: not cached
@@ -35,7 +35,7 @@
3535
# ROOT_VERSION_MINOR Minor version number of ROOT
3636
# ROOT_VERSION_PATCH Patch version number of ROOT
3737
#
38-
# ROOT_VERSION_NUMBER A unique version number which is calculated from
38+
# ROOT_VERSION_NUMBER A unique version number which is calculated from
3939
# major, minor and patch version found
4040
#
4141
# ROOT_CINT_EXECUTABLE The rootcint executable.
@@ -56,18 +56,18 @@ Set(ROOT_DEFINITIONS "")
5656
Set(ROOT_INSTALLED_VERSION_TOO_OLD FALSE)
5757
Set(ROOT_CONFIG_EXECUTABLE ROOT_CONFIG_EXECUTABLE-NOTFOUND)
5858

59-
Find_Program(ROOT_CONFIG_EXECUTABLE NAMES root-config
59+
Find_Program(ROOT_CONFIG_EXECUTABLE NAMES root-config
6060
PATHS ${ROOT_CONFIG_SEARCHPATH}
6161
NO_DEFAULT_PATH
6262
)
63-
63+
6464
If(ROOT_CONFIG_EXECUTABLE)
65-
66-
String(REGEX REPLACE "(^.*)/bin/root-config" "\\1" test ${ROOT_CONFIG_EXECUTABLE})
65+
66+
String(REGEX REPLACE "(^.*)/bin/root-config" "\\1" test ${ROOT_CONFIG_EXECUTABLE})
6767
Set(ENV{ROOTSYS} ${test})
6868
Set(ROOTSYS ${test})
6969

70-
Execute_Process(COMMAND ${ROOT_CONFIG_EXECUTABLE} --version
70+
Execute_Process(COMMAND ${ROOT_CONFIG_EXECUTABLE} --version
7171
OUTPUT_VARIABLE ROOT_VERSION_STRING
7272
)
7373
Execute_Process(COMMAND ${ROOT_CONFIG_EXECUTABLE} --prefix
@@ -78,8 +78,8 @@ If(ROOT_CONFIG_EXECUTABLE)
7878

7979

8080
MESSAGE(STATUS "Looking for Root... - Found ${ROOT_INSTALL_DIR}/bin/root")
81-
MESSAGE(STATUS "Looking for Root... - Found version is ${ROOT_VERSION_STRING} ")
82-
81+
MESSAGE(STATUS "Looking for Root... - Found version is ${ROOT_VERSION_STRING} ")
82+
8383
# extract major, minor, and patch versions from
8484
# the version string given by root-config
8585
String(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+.*" "\\1" ROOT_VERSION_MAJOR "${ROOT_VERSION_STRING}")
@@ -152,8 +152,8 @@ If(ROOT_FOUND)
152152

153153
#######################################
154154
#
155-
# Check the executables of ROOT
156-
# ( rootcint )
155+
# Check the executables of ROOT
156+
# ( rootcint )
157157
#
158158
#######################################
159159

@@ -174,9 +174,7 @@ If(ROOT_FOUND)
174174
Else(ROOT_FOUND)
175175

176176
If(ROOT_FIND_REQUIRED)
177-
Message(STATUS "Looking for ROOT... - Found version to old.")
178-
Message(STATUS "Looking for ROOT... - Minimum required version is ${ROOT_FIND_VERSION}")
179-
Message(FATAL_ERROR "Stop here because of a wrong Root version.")
177+
Message(FATAL_ERROR "Stop here because ROOT not found.")
180178
EndIf(ROOT_FIND_REQUIRED)
181179

182180
Endif(ROOT_FOUND)

0 commit comments

Comments
 (0)