Commit Graph

148 Commits

Author SHA1 Message Date
Jussi Pakkanen e3be7f7021 Write coredata transactionally. Closes #3511. 2018-05-21 00:48:25 +03:00
Xavier Claessens 570c108635 Fix --warnlevel being renamed to --warning-level in latest release 2018-04-27 11:09:14 -04:00
Xavier Claessens cb5ad2f211 Remove duplicated definition of -D cmdline arg 2018-04-26 22:46:40 -04:00
Jussi Pakkanen 9b0453d3e9
Merge pull request #3225 from filbranden/fixperms3
Introduce install_umask to determine permissions of files in install tree. Default it to 022
2018-04-26 23:14:00 +03:00
Jussi Pakkanen 9c073620aa
Merge pull request #3372 from NickeZ/vs-sol-folders
Use visual studio solution directories
2018-04-26 00:47:11 +03:00
Jussi Pakkanen d2f8f7e312 Bump version number for new development. [skip ci] 2018-04-23 23:11:34 +03:00
Jussi Pakkanen ade59f987f Updated version number for new release. 2018-04-23 03:24:26 +03:00
Filipe Brandenburger b0382733d8 Update default of install-umask to 022
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-18 11:44:54 -07:00
Filipe Brandenburger 8651d55c6a Add new builtin option --install-umask
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-18 11:44:54 -07:00
Niklas Claesson c6e03b9535 Use visual studio solution directories
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-17 23:41:03 +02:00
Dylan Baker 8120ff9cf7 Move builtin_argument_registration to coredata
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-17 11:32:26 -07:00
Dylan Baker 1452eb73c1 coredata: encapsulate destination name
This means that there are no special args passed ot builtin args
anymore.
2018-04-17 11:32:26 -07:00
Dylan Baker bbf71d9aa3 coredata: Add helper for setting action
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-17 11:32:26 -07:00
Jussi Pakkanen bdb57cf62a Convert Gnome module to use find_program from interpreter. 2018-04-15 13:32:38 +05:30
Xavier Claessens 58f063978e coredata: UserOption subclasses only need to implement validate_value()
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-12 00:51:06 +03:00
Xavier Claessens 68f9846b7c Add both_libraries() to build both shared and static libraries
Also support default_library='both' to make library() build both shared
and static libraries.

Closes #484
2018-04-03 15:38:01 -04:00
Aleksey Filippov e4faf396e6 Do not use bare except [flake8]
Use more specific exception types where appropriate.
This patch does not change bare except calls if exception is re-raised.
2018-03-11 23:36:04 +00:00
Jussi Pakkanen 80b101d5f3 Bumped version number for new development. 2018-03-04 21:14:03 +02:00
Jussi Pakkanen daaae647d7 Updated information for new release. 2018-03-04 20:27:34 +02:00
Hemmo Nieminen 7fb8e518b2 Harmonize data pickling.
Try to be more consistent on using save() and load() methods to pickle
data.
2018-03-01 01:06:51 +02:00
Jon Turney cf98f5e370 Enable searching system crossfile locations on more platforms
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-21 23:58:14 +02:00
Jussi Pakkanen 54d7817087 User options can "yield to" a user option of the same name in superproject. Closes ##2853. 2018-02-08 00:33:44 +02:00
Jussi Pakkanen 0204895143 Expose integer options to build option files. 2018-02-07 22:10:04 +02:00
Jussi Pakkanen 0538009d30 Bump minimum supported Python from 3.4 to 3.5. 2018-01-04 21:29:02 +02:00
Iñigo Martínez 1eab075c8e Deprecate duplicated values in array options
Duplicated options in array types have been removed by a previous
commit but someone could be using it.

The previous behaviour has been restored but the existence of
duplicates is now tested, and in that case a `DEPRECATION` message
is shown.
2017-12-19 21:31:27 +01:00
Iñigo Martínez 3a1f4ab34c Remove duplicated values in array options
Array options can receive duplicated values, which can produce
errors if case those duplicated values make processing some
elements twice when they are expected to be processed only once.
2017-12-18 10:23:26 +01:00
Jussi Pakkanen 19cd60205d Bump version number for new development. 2017-12-10 18:50:43 +02:00
Jussi Pakkanen e674434389 Updated version number for new release. 2017-12-10 17:56:27 +02:00
Jussi Pakkanen 4ae0cadb7f Renamed UserStringArrayOption to UserArrayOption for short. 2017-12-07 00:00:34 +02:00
Jussi Pakkanen bc83c58d37
Merge pull request #2731 from mesonbuild/disabler
Created disabler object type
2017-12-05 01:10:50 +02:00
Jussi Pakkanen 678daad6cc Created a new disabler type. 2017-12-04 23:53:23 +02:00
Jussi Pakkanen f8a419b27d String arguments can permit arbitrary string values
by leaving out the choices keyword.
2017-12-03 22:27:55 +02:00
Jussi Pakkanen 793fc002fa
Merge pull request #2390 from dcbaker/submit/options-list
Add an array type to user options
2017-12-02 19:54:27 +02:00
Dylan Baker 6f25e93b52 cross: Implement support for loading cross files from system paths
One thing that makes cross compiling with meson a pain is the need for
cross files. The problem is not with cross files themselves (they're
actually rather brilliant in that they allow for a much greater deal of
flexibility than autotools hardcoded paths approach) but that each user
needs to reimplement them themselves, when for most people what they
really want is a cross file that could be provided by their distro, all
they really want is the correct toolchain.

This patch is the first stop to making it easier for distros to ship
their own cross files (and for users to put their's somewhere safe so
they don't get `git clean`ed. It allows the cross files (on Linux and
*BSD) to be stored in home and system paths (~/.config/meson/cross,
/usr/share/meson/cross, and /usr/local/share/meson/cross), and to be
loaded by simply by specificying --cross-file.

With this patch meson will check the locations its always checked first,
(is cross file absolute, or is it relative to $PWD), then will check
~/.config/meson/cross, /usr/local/share/meson/cross,
/usr/share/meson/cross, (or $XDG_CONFIG_PATH and $XDG_DATA_DIRS) for the
files, raising an exception if it cannot find the specified cross file.

Fixes #2283
2017-11-30 22:34:27 +02:00
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.
2017-11-29 14:14:41 -08:00
William Hubbs 325b2c25b6 Allow prefix to be the root directory 2017-11-23 21:58:08 +02:00
Jussi Pakkanen 69bd87a716
Merge pull request #2511 from jon-turney/prefix-dependent-defaults
Make sysconfdir, localstatedir and sharedstatedir defaults depend on prefix
2017-11-13 21:14:59 +02:00
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
2017-11-06 20:55:05 +02:00
Jon Turney 24549dbed5 Make sysconfdir, localstatedir and sharedstatedir defaults depend on prefix
Rather than requiring a bit of boilerplate in every meson.build, which is
only documented in a comment in mesoncore.py, use sensible defaults for
sysconfdir, localstatedir and sharedstatedir depending on the prefix.

Fixes #1637

v2:
For clarity, give get_builtin_option_default() a noneIfSuppress argument,
rather than overloading prefix '' and None with special meanings.
2017-10-28 23:27:36 +01:00
Jussi Pakkanen 6f066af61f Updated version number for new development. 2017-10-08 23:46:50 +03:00
Jussi Pakkanen 5626df4645 Bump version number for release. 2017-10-08 22:36:06 +03:00
Jussi Pakkanen 244ef43651 Bumped version number for new development. 2017-08-15 01:54:07 +03:00
Jussi Pakkanen a629642f1e Bump numbers for new release. 2017-08-15 00:43:54 +03:00
Jussi Pakkanen a800c96f99 Add option to limit maximum number of concurrent link processes. 2017-08-05 00:24:59 +03:00
Jussi Pakkanen 797bca22a5 Bump version number for new development. 2017-06-20 00:14:40 +03:00
Jussi Pakkanen defcea7fb5 Update version number for bugfix release. 2017-06-19 23:47:28 +03:00
Jussi Pakkanen f75d394683 Update versions for new development. 2017-06-12 23:22:48 +03:00
Jussi Pakkanen 93681b0137 Updated version number for release. 2017-06-12 21:47:22 +03:00
Jussi Pakkanen 111e3df45d Moved coverage commands to a standalone script. 2017-05-13 22:54:08 +03:00
Jussi Pakkanen 255be79e22 Created a dist target. Closes #877. 2017-05-11 19:34:16 +03:00