Hi!
I have tried to find it in several places but I cannot find any source of information about it.
I am developing a general analysis framework which uses root when needed (input data structure, histograms, physics objects etc.) and I am compiling the tool with CMake. I can compile it fine locally but I would like to implement CI within the project. For this I am using an image with CMake but the isuee is, of course, when CMake tries to find the ROOT CMake package it fails because in that docker image there is no ROOT instalation. I have tried adding some docker images I have found which have ROOT as services (I am using the gitlab-ci for this) but ROOT is not setup properly and therefore it fails to find it.
I am including ROOT libraries with this part on my CMakeLists.txt file
# Check that ROOT in installed in the system
if(EXISTS $ENV{ROOTSYS}/cmake/ROOTConfig.cmake)
# ROOT has been compiled with CMake
list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
else()
#ROOT has been compiled with traditional configure/make
list(APPEND CMAKE_MODULE_PATH "$ENV{ROOTSYS}/ect/cmake/")
endif(EXISTS $ENV{ROOTSYS}/cmake/ROOTConfig.cmake)
find_package(ROOT REQUIRED)
include(${ROOT_USE_FILE})
It compiles with no issue so far. The problem is that ROOTSYS is not defined in the docker image.
Do you know what would be the proper way of solving this issue?
Thanks!
Juanpe.