-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Implement SYSTEM handler for cmake
dependencies.
#13576
base: master
Are you sure you want to change the base?
Conversation
cmake
dependencies.cmake
subprojects.
Failures looks relevant. It would also be good to add something to one of the existing tests to cover this. |
You are right, I just looked at the |
cmake
subprojects.cmake
dependencies.
Please always use In general, each commit should represent a discrete change proposal or step in the process of achieving the goal of a PR. |
@eli-schwartz Yes, I'll just check if this will pass CI and then cleanup for merge. |
ffbef56
to
d718d79
Compare
All tests appear to be passing now. I'll add a test for SYSTEM includes shortly. |
This doesn't include any tests for SYSTEM so all we actually know is that it doesn't regress currently tested scenarios. Would it be possible to add some simple mockup of the original issue? e.g. one of the tests in (Perhaps some trick with |
The current dependency handler for CMake configuration files doesn't handle including paths that were marked as
SYSTEM
. This can lead to header conflicts on certain occasions and ultimately hard-to-debug compilation failures.In my particular case, my program compilation fails when importing anything built with the NVIDIA RAPIDS CMake package. Their system depends on a newer version of
libcudacxx
that needs to be evaluated after the system includes of CUDA, which contains an older version oflibcudacxx
. This is achieved by markinglibcudacxx
asINTERFACE_INCLUDE_DIRECTORIES
(-I
) and CUDA asINTERFACE_SYSTEM_INCLUDE_DIRECTORIES
(-isystem
). Since Meson ignores theSYSTEM
flags, it just includes everything with-I
and the conflict begins.