Xavier Claessens
7c4736d27f
Convert args.projectoptions into a dict
...
This simplifies a lot of code, and centralize "key=value" parsing in a
single place.
Unknown command line options becomes an hard error instead of
merely printing warning message. It has been warning it would become an
hard error for a while now. This has exceptions though, any
unknown option starting with "<lang>_" or "b_" are ignored because they
depend on which languages gets added and which compiler gets selected.
Also any option for unknown subproject are ignored because they depend
on which subproject actually gets built.
Also write more command line parsing tests. "19 bad command line
options" is removed because bad cmd line option became hard error and
it's covered with new tests in "30 command line".
7 years ago
Xavier Claessens
218ed2de89
optinterpreter: Remove duplicated list of languages
...
It is important to keep the list of languages up to date in
optinterpreter, otherwise we could have conflicting options when adding
new languages.
7 years ago
Salamandar
364b8a37b9
Add 0.45.0 features
7 years ago
Salamandar
c90885de6d
Add 0.44.0 features
7 years ago
Thibault Saunier
62165aef43
options: s/yiel/yield/ typo
...
Making the option unusable with Invalid kwargs for option use_orc: "yield"
7 years ago
Hemmo Nieminen
ff1146bc8c
Fix subproject prefix handling when checking subproject option validity.
7 years ago
Jussi Pakkanen
54d7817087
User options can "yield to" a user option of the same name in superproject. Closes ##2853.
7 years ago
Jussi Pakkanen
0204895143
Expose integer options to build option files.
7 years ago
Dylan Baker
e245e57865
Warn on unknown command line arguments
...
I have a tendency to typo things. Humans in general are bad at spotting
spelling mistakes, computers are not. This patches prints the bad
options and provides the generic meson "This will be a hard error
someday" message.
7 years ago
Jussi Pakkanen
4ae0cadb7f
Renamed UserStringArrayOption to UserArrayOption for short.
7 years ago
Jussi Pakkanen
f8a419b27d
String arguments can permit arbitrary string values
...
by leaving out the choices keyword.
7 years ago
Dylan Baker
c9351ce30c
Add new array type option
...
This exposes the already existing UserStringArrayOption class through
the meson_options.txt. The intention is to provide a way for projects to
take list/array type arguments and validate that all of the elements in
that array are valid without using complex looping constructrs.
7 years ago
Xavier Claessens
b8187961b9
coredata: Remove parse_string() method
...
set_value() already does a better job at parsing strings, such as
accepting "True" for a boolean.
This fixes issue #2544
7 years ago
Dylan Baker
7dfad54f06
options: Add a permitted_kwargs function
...
I've typo'd "value" for the last time, options needs a kwargs validator.
This validator is slightly different than the one used by the main
parser, since it operates on a much simpler representation than the
other one does, and they are not interchangeable.
This also changes the optinterpreter to use pop on 'type' and
'description' so that they're not passed to the validator as kwargs.
7 years ago
Jussi Pakkanen
a800c96f99
Add option to limit maximum number of concurrent link processes.
7 years ago
Nirbheek Chauhan
8ee9365717
Allow option values to contain ':'
...
Instead, check that option keys don't contain ':'. Also change the
failing option test to look for this.
Closes https://github.com/mesonbuild/meson/issues/1454
8 years ago
Mike Sinkovsky
969be1f679
cleanup: Remove redundant parentheses
8 years ago
Igor Gnatenko
969dc7e995
style: fix E124 violations
...
E124: closing bracket does not match visual indentation
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Jussi Pakkanen
b55235dfbd
Fix space before :.
8 years ago
Jussi Pakkanen
73042c7912
Can set project options (but not global options) in subproject default options.
8 years ago
Elliott Sales de Andrade
d517bbfb5c
Raise clearer error if -Doption is invalid.
8 years ago
Igor Gnatenko
139e020ede
tree-wide: use proper 'not in' notation
...
Let's be more pythonic and 'not is' seems really weird.
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Jussi Pakkanen
14ca7d602c
Store subdir information for each node so we can remove files set in other subdirectories.
8 years ago
Elliott Sales de Andrade
4c71695e41
Use context manager for file I/O.
...
There are a few cases where a context manager cannot be used, such as
the logger.
8 years ago
Elliott Sales de Andrade
a2321b24f6
Flatten isinstance calls. ( #715 )
...
That is, isinstance(x, y) or isinstance(x, z) can be flattened with a
tuple to isinstance(x, (y, z)).
8 years ago
Matthias Klumpp
56823272ab
Implement D support
...
This patch adds support for the D programming language[1] to Meson.
The following compilers are supported:
* LDC
* GDC
* DMD
[1]: http://dlang.org/
8 years ago
Hemmo Nieminen
af6f4c9b9c
coredata: Centralize builtin option descriptions and definitions.
9 years ago
Hemmo Nieminen
336904b553
Move MesonException from coredata to mesonlib.
9 years ago
Jussi Pakkanen
8b619420f9
Open Meson and option files explicitly as utf-8. Closes #467 .
9 years ago
Jussi Pakkanen
0c9c29b6b6
Preserve b_ prefix for base option names.
9 years ago
Jussi Pakkanen
23b98cd6e6
Renamed meson package to mesonbuild so that we can have a script named meson in the same toplevel dir.
9 years ago
Jussi Pakkanen
8b1039fa30
Organise files into a module structure.
9 years ago
Minijackson
2bd702d5f1
Some fixes
9 years ago
Wink Saville
c49da5aa00
Enhance mesonconfig.py help
...
Added code to output the 'Possible values' and
also titles for the columns.
Added code to so 'choices' is allowed for all
UserOption's.
9 years ago
Jussi Pakkanen
8495075cee
Turned builtin options into proper objects.
9 years ago
Jussi Pakkanen
b197d9e279
Can set compiler options with mesonconf.
9 years ago
Jussi Pakkanen
4dff3f9fb3
Refactored option classes to mesonlib.
9 years ago
Jussi Pakkanen
ac127db919
Get builtin options by correct name in subprojects.
10 years ago
Jussi Pakkanen
214a6b5c0a
Set option name in constructor. Closes #164 .
10 years ago
Igor Gnatenko
bc865ab943
optinterpreter: Undefined variable 'valuestring'
...
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
10 years ago
Igor Gnatenko
cf8be3a22f
optinterpreter: fix bad-continuation
...
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
10 years ago
Jussi Pakkanen
a9b59573bc
Better error message when someone has a malformed meson_options.txt. Closes #160 .
10 years ago
Afief Halumi
cca29a3383
Better error messages for user options
10 years ago
Jussi Pakkanen
11a9f61e51
Renamed buildtype from "type" to "buildtype" for consistency.
10 years ago
Jussi Pakkanen
3630febe1e
Verify that option names do not have invalid characters.
10 years ago
Jussi Pakkanen
525f0ae6d2
Harmonised copyright declarations.
10 years ago
Jussi Pakkanen
55759e4aa9
Can specify project options on the command line and the override defaults.
11 years ago
Jussi Pakkanen
83237f2b38
Added option for werror.
11 years ago
Jussi Pakkanen
b8f6c3f39c
Standardise on prefix instead of installprefix.
11 years ago
Jussi Pakkanen
2502beccc9
The final renaming.
11 years ago