i2o isn't detected correctly
Summary
The i2o
library is detected using i2o/version.h
. However the packaging situation is more fun: i2o
is split across several packages. i2o/version.h
happens not to be in the same package as i2o/i2o.h
which is what we use (cmsos-core-i2o-devel
vs cmsos-core-externi2o-devel
). externi2o
is a header-only library.
Steps to reproduce
Build on a system without cmsos-core-externi2o-devel
; configure passes but build fails.
What is the expected correct behavior?
Configure step fails.
Relevant logs and/or screenshots
https://gitlab.cern.ch/lmoureau/cmsgemos/-/jobs/8188428
FAILED: gemreadout/CMakeFiles/gemreadout.dir/src/GEMReadoutApplication.cpp.o
/opt/rh/devtoolset-8/root/usr/bin/c++ -DLITTLE_ENDIAN__ -Dgemreadout_EXPORTS -Igemreadout/_interface -Igembase/_interface -Igemutils/_interface -isystem /opt/xdaq/include -isystem /opt/xdaq/include/linux -DGIT_VERSION=\"unknown\" -DGEMDEVELOPER=\"root\" -flto -fno-fat-lto-objects -fPIC -fdiagnostics-color=always -std=gnu++17 -MD -MT gemreadout/CMakeFiles/gemreadout.dir/src/GEMReadoutApplication.cpp.o -MF gemreadout/CMakeFiles/gemreadout.dir/src/GEMReadoutApplication.cpp.o.d -o gemreadout/CMakeFiles/gemreadout.dir/src/GEMReadoutApplication.cpp.o -c ../gemreadout/src/GEMReadoutApplication.cpp
In file included from ../gemreadout/src/GEMReadoutApplication.cpp:7:
gemreadout/_interface/gem/readout/GEMReadoutApplication.h:9:10: fatal error: i2o/i2o.h: No such file or directory
#include "i2o/i2o.h"
^~~~~~~~~~~
compilation terminated.
Environment
- Version used: unrelated build system fixes on top of current
develop
- Operation System: centos:7
Possible fixes
Add header-only support to FindxDAQ.cmake
(also required for nlohmann::json
); change the i2o
dependency to externi2o
, updating the header check to i2o/i2o.h
.
Edited by Louis Moureaux