Commit 9a2e3a7
Fix FindBpfObject.cmake bpf object header search setup
Quote of `CLANG_SYSTEM_INCLUDES` should be removed for
`add_custom_command`, otherwise all the options in this variable will be
treated as a single string and it causes header searching paths not
correctly set:
```
[ 56%] [clang] Building BPF object: minimal
In file included from /home/debian/projects/libbpf-bootstrap/examples/c/minimal.bpf.c:3:
In file included from /usr/include/linux/bpf.h:11:
/usr/include/linux/types.h:5:10: fatal error: 'asm/types.h' file not found
^~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/minimal.dir/build.make:78: minimal.bpf.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:288: CMakeFiles/minimal.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
```
Signed-off-by: Xin Zhang <zhangxin.xa@gmail.com>1 parent 8e37500 commit 9a2e3a7
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| |||
0 commit comments