You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have directory same this:
parent/include
parent/subproject/mysub/include
I need to include parent/include to mysub, I have try differnt mode but nothing works.
For now use this method:
inc += include_directories('../../include')
but meson reply with warning and proposes an incomprehensible alternative on how this very simple problem should be solved.
the meson reply:
fs.lib| Project name: vfs
vfs.lib| Project version: 0.0.0
vfs.lib| C compiler for the host machine: cc (gcc 14.1.1 "cc (GCC) 14.1.1 20240522")
vfs.lib| C linker for the host machine: cc ld.bfd 2.42.0
vfs.lib| subprojects/vfs.lib/meson.build:16: WARNING: include_directories sandbox violation!
The project is trying to access the directory '../../include' which belongs to a different
subproject. This is a problem as it hardcodes the relative paths of these two projects.
This makes it impossible to compile the project in any other directory layout and also
prevents the subproject from changing its own directory layout.
Instead of poking directly at the internals the subproject should be executed and
it should set a variable that the caller can then use. Something like:
# In subproject
some_dep = declare_dependency(include_directories: include_directories('include'))
# In subproject wrap file
[provide]
some = some_dep
# In parent project
some_dep = dependency('some')
executable(..., dependencies: [some_dep])
This warning will become a hard error in a future Meson release.
Does anyone know how I can include that directory without going crazy?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have directory same this:
parent/include
parent/subproject/mysub/include
I need to include parent/include to mysub, I have try differnt mode but nothing works.
For now use this method:
but meson reply with warning and proposes an incomprehensible alternative on how this very simple problem should be solved.
the meson reply:
Does anyone know how I can include that directory without going crazy?
thnaks, have a good life
Beta Was this translation helpful? Give feedback.
All reactions