Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure to populat the include_dirs of the lcio target #180

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

tmadlener
Copy link
Contributor

BEGINRELEASENOTES

  • Populate the target_include_directories of the LCIO::lcio target to make it properly usable downstream.

ENDRELEASENOTES

This is a leftover from #177 that went undiscovered until now.

@tmadlener tmadlener merged commit 189b332 into iLCSoft:master Dec 1, 2023
10 checks passed
@tmadlener tmadlener deleted the target-include-dirs branch December 1, 2023 11:18
@jmcarcell
Copy link
Contributor

Where was this an issue? I have built some packages using LCIO::lcio and didn't have issues

@tmadlener
Copy link
Contributor Author

I stumbled over this when trying to build against only LCIO. I have the suspicion that this went unnoticed, because something else populated this on the fly and then things worked (e.g. DD4hep creates this target, which is why we never saw it in k4geo).

@arummler
Copy link
Contributor

arummler commented Dec 3, 2023

I was just now trying to change the way we consume lcio from shipping an old copy to FetchContent: eudaq/eudaq#703
and stumbled over the same thing using the latest tag. Your commit partially resolves it as e.g. lcio.h is found linking just against the target LCIO::lcio but I believe it is not complete for in source builds. The include files under EVENT are not found:

[ 16%] Built target sio
Consolidate compiler generated dependencies of target lcio
[ 54%] Built target lcio
[ 54%] Building CXX object main/lib/lcio/CMakeFiles/lcio_interface.dir/src/LCEventConverter.cc.o
In file included from /home/rummler/Software/eudaq-master/main/lib/lcio/include/eudaq/LCEventConverter.hh:8,
from /home/rummler/Software/eudaq-master/main/lib/lcio/src/LCEventConverter.cc:1:
/home/rummler/Software/eudaq-master/build/_deps/extern_lcio-src/src/cpp/include/lcio.h:12:10: fatal error: EVENT/LCIO.h: No such file or directory
12 | #include "EVENT/LCIO.h"
| ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [main/lib/lcio/CMakeFiles/lcio_interface.dir/build.make:76: main/lib/lcio/CMakeFiles/lcio_interface.dir/src/LCEventConverter.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1692: main/lib/lcio/CMakeFiles/lcio_interface.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants