Dear rooters,
I use the following CMakeLists.txt to build a project whose only dependency is root.
If I use the -DUSE_FITISO=ON
option when building the project I add Fitsio
to the required components for ROOT
, in the project’s CMakeLists.txt
I added:
# load ROOT libraries, define a cache variable to enable FITSIO support
# if USE_FITSIO is selected, Fitsio is added to the ROOT requirements
set(ROOT_REQUIRED_COMPONENTS Minuit)
option(USE_FITSIO "Enable support for FITS files I/O" OFF)
if(USE_FITSIO)
list(APPEND ROOT_REQUIRED_COMPONENTS Fitsio)
endif()
find_package(ROOT REQUIRED ${ROOT_REQUIRED_COMPONENTS})
message("-- Required ROOT components are: ${ROOT_REQUIRED_COMPONENTS}")
Now the problem is that this component is not found, when building I get:
(root_v6-22-6) cosimo@posimo:~/work/gLike/build$ cmake ../ -DUSE_FITSIO=ON
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /home/cosimo/software/miniconda3/envs/root_v6-22-6/bin/x86_64-conda-linux-gnu-cc
-- Check for working C compiler: /home/cosimo/software/miniconda3/envs/root_v6-22-6/bin/x86_64-conda-linux-gnu-cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/cosimo/software/miniconda3/envs/root_v6-22-6/bin/x86_64-conda-linux-gnu-c++
-- Check for working CXX compiler: /home/cosimo/software/miniconda3/envs/root_v6-22-6/bin/x86_64-conda-linux-gnu-c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /home/cosimo/software/miniconda3/envs/root_v6-22-6/cmake/ROOTConfig.cmake:159 (message):
ROOT component Fitsio not found
Call Stack (most recent call first):
CMakeLists.txt:17 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/cosimo/work/gLike/build/CMakeFiles/CMakeOutput.log".
Fitsio is not found despite ROOT
has been successfully compiled with it
(root_v6-22-6) cosimo@posimo:~/work/gLike/build$ root-config --has-fitsio
yes
I get the same error both if I manually compile root or if I use the root provided with conda.
Am I mistaking the name of the component?
Any help is highly apprectiated,
Thanks a lot!
Cosimo
ROOT Version: 6.22.06
Platform: Ubuntu (18.04 and 20.04)