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

restrict includes for CMake #1518

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KrisThielemans
Copy link
Collaborator

We had some remaining "global" include_directories. Using target_include_directories means it's more specific, and we don't need to explicitly export them anymore, and neither do they need to be added to the global include path in STIRConfig.cmake.

Similarly, the following line is not needed

include(${ITK_USE_FILE})

This PR reduces possible conflicts when importing STIR.

We had some remaining "global" include_directories. Using
target_include_directories means it's more specific, and we don't need
to explicitly export them anymore.

This reduces possible conflicts when importing STIR.
It turns out that we don't need `include(${ITK_USE_FILE})` in
STIRConfig.cmake. This therefore avoids adding the ITK include directory
to the global include path.

Effectively fixes UCL#432 as when building STIR, we don't mind (currently
anyway).
@KrisThielemans
Copy link
Collaborator Author

KrisThielemans commented Nov 14, 2024

  2%] Building CXX object src/buildblock/CMakeFiles/buildblock.dir/ProjData.cxx.o
In file included from /home/runner/work/STIR/STIR/src/include/stir/ProjDataGEHDF5.h:29,
                 from /home/runner/work/STIR/STIR/src/buildblock/ProjData.cxx:45:
/home/runner/work/STIR/STIR/src/include/stir/IO/GEHDF5Wrapper.h:31:10: fatal error: H5Cpp.h: No such file or directory
   31 | #include "H5Cpp.h"

So, we currently need HDF5 as a dependency of buildblock as well.

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

Successfully merging this pull request may close these issues.

1 participant