Skip to content
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

feature option can't be set to auto when auto_features is set #5364

Open
lazka opened this issue May 5, 2019 · 1 comment
Open

feature option can't be set to auto when auto_features is set #5364

lazka opened this issue May 5, 2019 · 1 comment

Comments

@lazka
Copy link
Contributor

lazka commented May 5, 2019

meson.build:

project('foo', 'c', version : '1.16.0')
if get_option('opencv').auto()
  message('opencv: auto')
elif get_option('opencv').enabled()
  message('opencv: enabled')
else
  message('opencv: disabled')
endif

meson_options.txt:

option('opencv', type : 'feature', value : 'auto')
  • Run: meson -Dauto_features=enabled -Dopencv=auto _build
  • Expected: opencv is set to auto
  • Actual: opencv is set to enabled

Context: I'm using auto_features=enabled for packaging and after that changing each option as needed. An error message would also work I guess, I wanted to use it this way to work around a bug in the gstreamer meson build.

@dcbaker
Copy link
Member

dcbaker commented May 9, 2019

That is the intended behavior, the idea is that packagers can use that option to ensure that there is no automagic going on behind their backs. We could (and maybe should) give a warning/error when auto_features is set and a features is explicitly set to auto.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants