mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.65k stars 1.64k forks source link

subproject with as_system('system') does not use -isystem #13611

Open sla89 opened 2 months ago

sla89 commented 2 months ago

Describe the bug I have a subproject which builds DPDK for me (also a meson project).

I want to use it as a system dependency to suppress build warnings in my project.

Therefore I use

dpdk_dep = subproject('dpdk', default_options: dpdk_opt).get_variable('dpdk_dep').as_system('system')

but it is still included using -I instead of -isystem.

For my other subprojects like flatbuffers, gtest or nats.c it works like a charm but not for DPDK.

I am wondering what is special here.

To Reproduce I have setup a minimal example repo: https://github.com/sla89/meson_isystem_dpdk

Checkout setup.log and [build.log](https://github.com/sla89/meson_isystem_dpdk/blob/main/build.log] for fulll log output.

As I have mentioned in the readme the following happens:

[145/225] c++ -Isrc/main.p -Isrc -I../src -Isubprojects/dpdk -I../subprojects/dpdk -Isubprojects/dpdk/config -I../subprojects/dpdk/config -Isubprojects/dpdk/lib/eal/include -I../subprojects/dpdk/lib/eal/include -Isubprojects/dpdk/lib/eal/linux/include -I../subprojects/dpdk/lib/eal/linux/include -Isubprojects/dpdk/lib/eal/x86/include -I../subprojects/dpdk/lib/eal/x86/include -Isubprojects/dpdk/lib/log -I../subprojects/dpdk/lib/log -Isubprojects/dpdk/lib/kvargs -I../subprojects/dpdk/lib/kvargs -I../subprojects/dpdk/lib/metrics -Isubprojects/dpdk/lib/telemetry -I../subprojects/dpdk/lib/telemetry -Isubprojects/dpdk/lib/eal/common -I../subprojects/dpdk/lib/eal/common -Isubprojects/dpdk/lib/eal -I../subprojects/dpdk/lib/eal -Isubprojects/dpdk/lib/ring -I../subprojects/dpdk/lib/ring -Isubprojects/dpdk/lib/rcu -I../subprojects/dpdk/lib/rcu -Isubprojects/dpdk/lib/mempool -I../subprojects/dpdk/lib/mempool -Isubprojects/dpdk/lib/mbuf -I../subprojects/dpdk/lib/mbuf -Isubprojects/dpdk/lib/net -I../subprojects/dpdk/lib/net -Isubprojects/dpdk/lib/meter -I../subprojects/dpdk/lib/meter -Isubprojects/dpdk/lib/ethdev -I../subprojects/dpdk/lib/ethdev -Isubprojects/dpdk/lib/pci -I../subprojects/dpdk/lib/pci -Isubprojects/dpdk/lib/cmdline -I../subprojects/dpdk/lib/cmdline -Isubprojects/dpdk/lib/hash -I../subprojects/dpdk/lib/hash -Isubprojects/dpdk/lib/stack -I../subprojects/dpdk/lib/stack -Isubprojects/dpdk/drivers/bus/pci -I../subprojects/dpdk/drivers/bus/pci -I../subprojects/dpdk/drivers/bus/pci/linux -Isubprojects/dpdk/drivers/bus/vdev -I../subprojects/dpdk/drivers/bus/vdev -Isubprojects/dpdk/drivers/mempool/ring -I../subprojects/dpdk/drivers/mempool/ring -Isubprojects/dpdk/drivers/net/af_packet -I../subprojects/dpdk/drivers/net/af_packet -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O0 -g -include rte_config.h -march=native -mrtm -MD -MQ src/main.p/main.cpp.o -MF src/main.p/main.cpp.o.d -o src/main.p/main.cpp.o -c ../src/main.cpp

Expected behavior I would like meson to use -isystem when I use `as_system('system').

system parameters

Can you maybe tell me what I am doing wrong, please?

sla89 commented 1 month ago

Ping - any statement about this, please?

sla89 commented 2 weeks ago

@eli-schwartz or @dcbaker maybe?