Skip to content

cmake doesn't detect missing xcept

Summary

Using the CI setup of !12 (merged), one finds that configuring works even if xcept is not installed. This was demonstrated in my own fork (privately to avoid spamming with dozens of notifications) at https://gitlab.cern.ch/lmoureau/cmsgemos/-/jobs/8140571

Steps to reproduce

Uncomment the build line in !12 (merged) and push to a repo with Gitlab CI enabled.

What is the expected correct behavior?

cmake fails to configure when xcept is missing.

Relevant logs and/or screenshots

Relevant part of the CMake log:

-- Found xDAQ_cgicc: /opt/xdaq/lib/libcgicc.so  
-- Found xDAQ_config: /opt/xdaq/lib/libconfig.so  
-- Found xDAQ_i2o: /opt/xdaq/lib/libi2o.so  
-- Found xDAQ_log4cplus: /opt/xdaq/lib/liblog4cplus.so  
-- Found xDAQ_tstore: /opt/xdaq/lib/libtstore.so  
-- Found xDAQ_toolbox: /opt/xdaq/lib/libtoolbox.so  
-- Found xDAQ_xcept: /opt/xdaq/lib/libxcept.so  
-- Found xDAQ_xdaq: /opt/xdaq/lib/libxdaq.so  
-- Found xDAQ_xdaq2rc: /opt/xdaq/lib/libxdaq2rc.so  
-- Found xDAQ_xdata: /opt/xdaq/lib/libxdata.so  
-- Found xDAQ_xerces-c: /opt/xdaq/lib/libxerces-c.so  
-- Found xDAQ_xgi: /opt/xdaq/lib/libxgi.so  
-- Found xDAQ_xoap: /opt/xdaq/lib/libxoap.so  
-- Found xDAQ: /opt/xdaq/include (Required is at least version "3.4") found components:  cgicc config i2o log4cplus tstore toolbox xcept xdaq xdaq2rc xdata xerces-c xgi xoap 

Example build failure (note the correct -isystem /opt/xdaq/include):

[8/98] Building CXX object gembase/CMakeFiles/gembase.dir/src/GEMFSM.cpp.o
FAILED: gembase/CMakeFiles/gembase.dir/src/GEMFSM.cpp.o 
/opt/rh/devtoolset-8/root/usr/bin/c++  -Dgembase_EXPORTS -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 gembase/CMakeFiles/gembase.dir/src/GEMFSM.cpp.o -MF gembase/CMakeFiles/gembase.dir/src/GEMFSM.cpp.o.d -o gembase/CMakeFiles/gembase.dir/src/GEMFSM.cpp.o -c ../gembase/src/GEMFSM.cpp
In file included from /opt/xdaq/include/toolbox/task/exception/Exception.h:16,
                 from /opt/xdaq/include/toolbox/task/WorkLoop.h:20,
                 from /opt/xdaq/include/toolbox/fsm/AsynchronousFiniteStateMachine.h:22,
                 from ../gembase/src/GEMFSM.cpp:7:
/opt/xdaq/include/toolbox/exception/Exception.h:16:10: fatal error: xcept/Exception.h: No such file or directory
 #include "xcept/Exception.h"
          ^~~~~~~~~~~~~~~~~~~

Environment

  • Version used: see above
  • Operation System: see above