Replies: 1 comment 1 reply
-
CMake allows redefining existing build types and it's an endless source of trouble. IMO this should never ever ever be allowed. If a built-in buildtype is irreparably broken for a given project, simply define a new build type and use that instead. Check for its use in meson.build and raise an error() if users use it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I had an idea about an improvement for
buildtype
, and I'd like to get some feedback about it.My idea would be to add a new function to
meson.options
file:buildtype('name', debug: true, optimization: '1', ...)
where keywords would be any existing option (builtin, or user defined).
That function would allow three things:
debug
oroptimization
For instance, one could define the default
b_ndebug
option per buildtype like this:Same for
b_vscrt
, or for any other option (builtin or user).Having this would lessen the need for special option values like
'if-release'
forb_ndebug
, or'from_buildtype'
and'static_from_buildtype'
forb_vscrt
, and would allow other options to depend on the buildtype, without special treatment.The order of precedence would be:
default_options
buildtype
optionsWhat do you think of this?
Beta Was this translation helpful? Give feedback.
All reactions