This is the idiomatic way to handle include directories in CMake.
Details
- Reviewers
ldionne smeenai beanz urnathan - Group Reviewers
Restricted Project Restricted Project - Commits
- rG186a13f647ac: [CMake][libcxx] Use target_include_directories for libc++ headers
rG203455c85ad0: [CMake][libcxx] Use target_include_directories for libc++ headers
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
runtimes/CMakeLists.txt | ||
---|---|---|
76 | maybe put a precis of 19227 here (as well as the reference), I like comments but I am the new kid :) |
IIUC, CMake was basically ignoring the target_include_directories(cxx-headers INTERFACE <path>) previously because <path> was part of ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}? Hmm, that's a good find.
LGTM but can you please rebase onto main to get a clean CI run?
Hi Peter
i am seeing a buildbot failure in https://lab.llvm.org/buildbot/#/builders/193/builds/11528
after this patch landed. backing up to predecessor patch builds ok. This is during our build of the openmp project for amdgpu.
suggestions please ?
llvm-project/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
In file included from /home/rlieberm/mono-repo/llvm-project/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp:13:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/algorithm:62:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algo.h:59:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib:75:15: fatal error: 'stdlib.h' file not found
#include_next <stdlib.h>
^~~~~~~~~~
1 error generated.
I'll need some time to properly investigate this so I'm going to revert this change in the meantime.
maybe put a precis of 19227 here (as well as the reference), I like comments but I am the new kid :)
IIUC it's because were doing the clang equivalent of gcc's -nostdinc?