Fix Ninja build failing in the pipeline
Summary
When using Ninja as a build system, it failed with the following error:
[323/1010] Building CXX object tapeserver/castor/tape/tapeserver/daemon/CMakeFiles/ctatapeserverdaemonunittests.dir/DataTransferSessionTest.cpp.o
FAILED: tapeserver/castor/tape/tapeserver/daemon/CMakeFiles/ctatapeserverdaemonunittests.dir/DataTransferSessionTest.cpp.o
/usr/bin/c++ -Dctatapeserverdaemonunittests_EXPORTS -I/builds/cta/CTA/build_rpm/RPM/BUILD/cta-5-7851384gite0b67a00 -I/builds/cta/CTA/build_rpm/RPM/BUILD/cta-5-7851384gite0b67a00/build -I/usr/include/shift -I/builds/cta/CTA/build_rpm/RPM/BUILD/cta-5-7851384gite0b67a00/tapeserver -I/builds/cta/CTA/build_rpm/RPM/BUILD/cta-5-7851384gite0b67a00/tapeserver/h -I/builds/cta/CTA/build_rpm/RPM/BUILD/cta-5-7851384gite0b67a00/build/tapeserver -fPIC -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -fstack-protector-all -std=c++17 -g -fPIC -MD -MT tapeserver/castor/tape/tapeserver/daemon/CMakeFiles/ctatapeserverdaemonunittests.dir/DataTransferSessionTest.cpp.o -MF tapeserver/castor/tape/tapeserver/daemon/CMakeFiles/ctatapeserverdaemonunittests.dir/DataTransferSessionTest.cpp.o.d -o tapeserver/castor/tape/tapeserver/daemon/CMakeFiles/ctatapeserverdaemonunittests.dir/DataTransferSessionTest.cpp.o -c /builds/cta/CTA/build_rpm/RPM/BUILD/cta-5-7851384gite0b67a00/tapeserver/castor/tape/tapeserver/daemon/DataTransferSessionTest.cpp
In file included from /builds/cta/CTA/build_rpm/RPM/BUILD/cta-5-7851384gite0b67a00/objectstore/Agent.hpp:20,
from /builds/cta/CTA/build_rpm/RPM/BUILD/cta-5-7851384gite0b67a00/scheduler/OStoreDB/OStoreDBFactory.hpp:24,
from /builds/cta/CTA/build_rpm/RPM/BUILD/cta-5-7851384gite0b67a00/tapeserver/castor/tape/tapeserver/daemon/DataTransferSessionTest.cpp:70:
/builds/cta/CTA/build_rpm/RPM/BUILD/cta-5-7851384gite0b67a00/objectstore/ObjectOps.hpp:24:10: fatal error: objectstore/cta.pb.h: No such file or directory
24 | #include "objectstore/cta.pb.h"
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
tapeserver/castor/tape/tapeserver/daemon/DataTransferSessionTest.cpp
imports something from objectstore
, but there is no dependency specified in the cmake for this. This MR adds this dependency for DataTransferSessionTest
See https://gitlab.cern.ch/cta/CTA/-/pipelines/7856417 for a pipeline that was run with Ninja that passes with this fix.
I did not update the release notes for this one as it is already covered by - cta/CTA#355 - Added option to build CTA with ninja
for the next release.
Additional Required Actions
- Requires manual tests in pre-production: NO
- Requires a documentation update: NO
References
Closes #804 (closed)
Edited by Niels Alexander Buegel