aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/coredata.py
AgeCommit message (Collapse)AuthorFilesLines
2018-10-16Update version number for release.0.48.1Jussi Pakkanen1-1/+1
2018-09-22Bump version number for release.Jussi Pakkanen1-1/+1
2018-09-18Drop unnecessary periods from help stringsZbigniew Jędrzejewski-Szmek1-25/+25
The ones for "Compiler options" have no dots, so this was inconsistent. Also dropping the dots makes the text fit better on narrow terminals.
2018-09-13New numbering scheme for pre-release versions. [skip ci]Jussi Pakkanen1-1/+1
2018-08-22Set wrap_mode to None by default to know if user passed a valueXavier Claessens1-1/+2
2018-08-20UserArrayOption: Allow duplicates when used as <lang>_args optionXavier Claessens1-2/+3
Closes: #4021.
2018-08-18Convert buildtype to optimization and debug options (#3489)Jussi Pakkanen1-3/+49
2018-07-22Added install target to VS. Closes #3841.Jussi Pakkanen1-0/+1
2018-07-07Add new method: mlog.deprecation()Nirbheek Chauhan1-1/+1
Instead of constructing it manually, use a helper.
2018-07-05Fix flake8 issues (#3834)Jon Turney1-1/+0
* Fix flake8 whitespace reports $ flake8 | grep -E '(E203|E221|E226|E303|W291|W293)' ./mesonbuild/coredata.py:337:5: E303 too many blank lines (2) * Fix flake8 'variable assigned value but unused' reports $ flake8 | grep -E F841 ./mesonbuild/modules/gnome.py:922:9: F841 local variable 'target_name' is assigned to but never used * Fix flake8 'imported but unused' reports $ flake8 | grep F401 ./mesonbuild/compilers/__init__.py:128:1: F401 '.c.ArmclangCCompiler' imported but unused ./mesonbuild/compilers/__init__.py:138:1: F401 '.cpp.ArmclangCPPCompiler' imported but unused ./mesonbuild/modules/__init__.py:4:1: F401 '..mlog' imported but unused PR #3717 imports ARMCLANG compilers in __init__, but does not add them to __all__, so they are not re-exported by the compilers package like everything else. * More details about flake8 in Contributing.md Mention that Sider runs flake8 Suggest seting flake8 as a pre-commit hook
2018-07-02Bump version number for new development. [skip ci]Jussi Pakkanen1-1/+1
2018-07-02Update everything for new release.0.47.0Jussi Pakkanen1-1/+1
2018-06-29Options: treat array option -Dopt= and -Dopt=[] as equivalentDylan Baker1-0/+2
Currently the former will be parsed as [''], while the latter is parsed as [] in python. This makes for some obnoxious special handling depending on what the user passes. This is even more obnoxious since for string type arguments this doesn't require special handling.
2018-06-19Downgrade unknown option from exception to warningXavier Claessens1-1/+1
It used to be non-fatal warnings but recent command line refactor made it fatal. It looks like GNOME continuous would break with this change. To avoid delaying upcoming 0.47.0 release adoption, let's downgrade this back to warning for now and reconsider after the release.
2018-06-18Add UserFeatureOption typeXavier Claessens1-0/+18
This is a special type of option to be passed to most 'required' keyword arguments. It adds a 3rd state to the traditional boolean value to cause those methods to always return not-found even if the dependency could be found. Since integrators doesn't want enabled features to be a surprise there is a global option "auto_features" to enable or disable all automatic features.
2018-06-10Visual Studio: Implement startup projectNiklas Claesson1-3/+13
2018-06-09Refine cross file checking to ignore directoriesJon Turney1-2/+2
e.g. 'meson x86_64-w64-mingw32 --cross-file x86_64-w64-mingw32' currently fails with an IsADirectoryError exception. Cross files must be files, so when searching, only accept a candidate path which is an existing file, not just an existing path.
2018-06-06Convert args.projectoptions into a dictXavier Claessens1-30/+11
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".
2018-06-06coredata: Stop setting default option values as argparse attributeXavier Claessens1-34/+16
All options are now the projectoptions list, regardless of how they got defined in the command line. This also delays setting builtin option values until the main project() default options are parsed to simplify the code. This is possible because we already delayed setting the backend after parsing main project() in a previous commit.
2018-06-06UserUmaskOption: Add 'preserve' in choices and use octal notationXavier Claessens1-0/+1
2018-06-06UserUmaskOption: Implement validate_value instead of set_valueXavier Claessens1-5/+4
set_value() is implemented by the base class, subclasses only need to override validate_value().
2018-06-06mconf: Set prefix first because other options depends on itXavier Claessens1-6/+29
2018-06-06mconf: Report all unknown cmd line options instead of aborting on firstXavier Claessens1-2/+8
This is also more consistent with the error message returned by optinterpreter when it finds unknown command line options.
2018-06-06Move to coredata some methods handling optionsXavier Claessens1-0/+31
Those methods only use coredata object, so better just move them as a coredata method.
2018-06-06Delay backend creation until project() is parsedXavier Claessens1-3/+9
The project() function could have a different value for the backend option in its default_options kwargs. Also set backend options, passing them in command line had no effect previously.
2018-06-06Move <lang>_args to coredata.compiler_optionsXavier Claessens1-7/+12
2018-06-06UserArrayOption: Small cleanup in value parsingXavier Claessens1-13/+12
It is nicer to early raise exception if the value from meson_options.txt is not a string in "[]" format than duplicating the parser code for both cases. Also it was checking for duplicated items only in the user_input case, but we should also check for dups in the default value from meson_options.txt.
2018-06-06UserArrayOption: Add support for splitting on space instead of comaXavier Claessens1-2/+6
2018-05-21Write coredata transactionally. Closes #3511.Jussi Pakkanen1-1/+10
2018-04-27Fix --warnlevel being renamed to --warning-level in latest releaseXavier Claessens1-13/+41
2018-04-26Remove duplicated definition of -D cmdline argXavier Claessens1-0/+2
2018-04-26Merge pull request #3225 from filbranden/fixperms3Jussi Pakkanen1-3/+22
Introduce install_umask to determine permissions of files in install tree. Default it to 022
2018-04-26Merge pull request #3372 from NickeZ/vs-sol-foldersJussi Pakkanen1-1/+7
Use visual studio solution directories
2018-04-23Bump version number for new development. [skip ci]Jussi Pakkanen1-1/+1
2018-04-23Updated version number for new release.0.46.0Jussi Pakkanen1-1/+1
2018-04-18Update default of install-umask to 022Filipe Brandenburger1-1/+1
And, with that, update the test cases that checked that preserving the original permissions worked to set install_umask=preserve explicitly in those projects' default_options. Tested: ./run_tests.py
2018-04-18Add new builtin option --install-umaskFilipe Brandenburger1-3/+22
This option controls the permissions of installed files (except for those specified explicitly using install_mode option, e.g. in install_data rules.) An install-umask of 022 will install all binaries, directories and executable files with mode rwxr-xr-x, while all data and non-executable files will be installed with mode rw-r--r--. Setting install-umask to the string 'preserve' will disable this feature, keeping the permissions of installed files same as the files in the build tree (or source tree for install_data and install_subdir.) Note that, in this case, the umask used when building and that used when checking out the source tree will leak into the install tree. Keep the default as 'preserve', to show that no behavior is changed and all tests keep passing unchanged. Tested: ./run_tests.py
2018-04-17Use visual studio solution directoriesNiklas Claesson1-1/+7
This implements support for visual studio solution directories. Projects will by default be put into directories that map their sub-directory name in the source folder. No directories are created if `--layout=flat` is used. Fixes: #2524
2018-04-17Move builtin_argument_registration to coredataDylan Baker1-0/+24
We're going to want to use these functions in meson configure as well to make the command line options the same between `meson` and `meson configure`.
2018-04-17coredata: encapsulate destination nameDylan Baker1-0/+6
This means that there are no special args passed ot builtin args anymore.
2018-04-17coredata: Add helper for setting actionDylan Baker1-0/+8
Currently we manually pass the argparse action, this isn't very DRY, since the builtin_types already has all the data necessary to find that. This adds a new function to determine the action based on the default type.
2018-04-15Convert Gnome module to use find_program from interpreter.Jussi Pakkanen1-1/+0
2018-04-12coredata: UserOption subclasses only need to implement validate_value()Xavier Claessens1-49/+24
Implementing set_value() in the base class simplifies the code and ensure validation is always consistent. This fix UserIntegerOption.validate_value() not checking min/max value, and UserArrayOption.validate_value() raising exception because it does not pass a value for user_input argument of validate() method.
2018-04-03Add both_libraries() to build both shared and static librariesXavier Claessens1-1/+1
Also support default_library='both' to make library() build both shared and static libraries. Closes #484
2018-03-11Do not use bare except [flake8]Aleksey Filippov1-1/+1
Use more specific exception types where appropriate. This patch does not change bare except calls if exception is re-raised.
2018-03-04Bumped version number for new development.Jussi Pakkanen1-1/+1
2018-03-04Updated information for new release.0.45.0Jussi Pakkanen1-1/+1
2018-03-01Harmonize data pickling.Hemmo Nieminen1-2/+4
Try to be more consistent on using save() and load() methods to pickle data.
2018-02-21Enable searching system crossfile locations on more platformsJon Turney1-7/+7
There's no reason not to also look in these places on Cygwin or OSX. Don't do this on Windows, as these paths aren't meaningful there. Move test_cross_file_system_paths from LinuxlikeTests to AllPlatformTests.
2018-02-08User options can "yield to" a user option of the same name in superproject. ↵Jussi Pakkanen1-12/+18
Closes ##2853.