-
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
Subproject default_options are ignored #6728
Comments
This seems to be a long-standing issue. As a workaround you can put all default options for your subprojects in the superproject's project('taisei', 'c',
license : 'MIT',
version : 'v1.4-dev',
meson_version : '>=0.48.0',
default_options : [
# Should really be c11, but gnu11 is a safer default because everything is terrible.
'c_std=gnu11',
'default_library=static',
'libzip:enable_crypto=false',
'libzip:enable_bzip2=false',
'sdl2:use_haptic=disabled',
'sdl2:use_power=disabled',
'sdl2:use_render=disabled',
'sdl2:use_sensor=disabled',
# You may want to change these for a debug build dir
'buildtype=release',
'strip=true',
'b_lto=true',
'b_ndebug=if-release',
]
) |
@Akaricchi Thank you very much for the workaround, that's not too bad! |
As a data point, this workaround hasn't been working for me with meson 0.55.0. |
I don't think it's possible to have a per-project |
It will be changed to per subprojects option, there is a wip branch there: #6729. |
Is it still the case that |
@phillipjohnston Right now only a couple of options are allowed on a per-project basis: default_library, werror (and one more I can't remember off the top of my head). We keep adding more over time, but other ones are ignored, yes. |
@dcbaker, thanks for that note. Here, I was specifically referring to
|
I think you should be able to pass user options via default_options, but @xclaesse probably knows better. |
in addition any user defined common options between superproject and subproject doesn't passed
|
Do you have |
yes as in my example |
Sorry... I missed that, I put it at the end in mine, so my brain went right past it :) |
any idea ? |
Is it possible to add a warning/error for any options that are ignored ? |
These are normally set in labwc's meson.build, but for some reason that isn't working correctly with subproject(). Possibly related: mesonbuild/meson#6728
These are normally set in labwc's meson.build, but for some reason that isn't working correctly with subproject(). Possibly related: mesonbuild/meson#6728
These are normally set in labwc's meson.build, but for some reason that isn't working correctly with subproject(). Possibly related: mesonbuild/meson#6728
These are normally set in labwc's meson.build, but for some reason that isn't working correctly with subproject(). Possibly related: mesonbuild/meson#6728
These are normally set in labwc's meson.build, but for some reason that isn't working correctly with subproject(). Possibly related: mesonbuild/meson#6728
These are normally set in labwc's meson.build, but for some reason that isn't working correctly with subproject(). Possibly related: mesonbuild/meson#6728
These are normally set in labwc's meson.build, but for some reason that isn't working correctly with subproject(). Possibly related: mesonbuild/meson#6728
These are normally set in labwc's meson.build, but for some reason that isn't working correctly with subproject(). Possibly related: mesonbuild/meson#6728
These are normally set in labwc's meson.build, but for some reason that isn't working correctly with subproject(). Possibly related: mesonbuild/meson#6728
These are normally set in labwc's meson.build, but for some reason that isn't working correctly with subproject(). Possibly related: mesonbuild/meson#6728
These are normally set in labwc's meson.build, but for some reason that isn't working correctly with subproject(). Possibly related: mesonbuild/meson#6728
These are normally set in labwc's meson.build, but for some reason that isn't working correctly with subproject(). Possibly related: mesonbuild/meson#6728
Describe the bug
The 'default_options' argument to 'subproject()' seems to be ignored.
To Reproduce
Main
meson.build
:Libfoo
meson.build
:Libfoo
meson_options.txt
:Then:
Tests are built, the
default_options
setting is ignored.meson configure
shows 'libfoo:BUILD_TESTS = true'.To achieve desired behaviour, the option has to be specified from the command line:
Expected behavior
Don't ignore
subproject()
default_options
.system parameters
The text was updated successfully, but these errors were encountered: