Commit Graph

127 Commits

Author SHA1 Message Date
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
Nirbheek Chauhan 8cf29bd288 Completely overhaul caching of external dependencies
The old caching was a mess of spaghetti code layered over pasta code.

The new code is well-commented, is clear about what it's trying to do,
and uses a blacklist of keyword arguments instead of a whitelist while
generating identifiers for dep caching which makes it much more robust
for future changes.

The only side-effect of forgetting about a new keyword argument would
be that the dependency would not be cached unless the values of that
keyword arguments were the same in the cached and new dependency.

There are also more tests which identify scenarios that were broken
earlier.
2017-05-09 14:24:48 +05:30
Jussi Pakkanen de43182205 Bumped version number for new development. 2017-04-28 21:38:25 +03:00
Jussi Pakkanen b25d3e4d3f Updated version numbers for point release. 2017-04-28 21:01:13 +03:00
Jussi Pakkanen 568de3a14a Bump version number for new development. 2017-04-27 18:36:36 +03:00
Jussi Pakkanen 7dc747ea54 Update version number for release. 2017-04-23 02:00:54 +03:00
Jussi Pakkanen b48daeda1a Make it possible to only do unity builds on subprojects. 2017-04-15 18:28:36 +03:00
Nirbheek Chauhan 6042e21e25 Use CPPFLAGS for pre-processor compiler checks
Also don't add CFLAGS twice for links() checks

Includes a test for this.
2017-04-04 23:38:36 +05:30
Jussi Pakkanen 8b73d80792 Merge pull request #1457 from mesonbuild/overrides
Add MVP implementation of overriding options.
2017-04-03 23:31:32 +03:00
Jussi Pakkanen 553ac89e02 Review fixes. 2017-04-02 00:07:23 +03:00
Jussi Pakkanen 319398f074 Proxy object for overriding options transparently. 2017-04-02 00:07:23 +03:00
Jussi Pakkanen e5a6283c4c Add MVP implementation of overriding options. 2017-04-02 00:04:45 +03:00
Nirbheek Chauhan 14d0f38158 Try harder to use the C compiler for compiling asm
Use an ordered dict for the compiler dictionary and sort it according
to a priority order: fortran, c, c++, etc.

This also ensures that builds are reproducible because it would be
a toss-up whether a C or a C++ compiler would be used based on the
order in which compilers.items() would return items.

Closes https://github.com/mesonbuild/meson/issues/1370
2017-03-27 11:25:22 +05:30
Jussi Pakkanen e4c224bdc1 Merge pull request #1516 from centricular/git-submodule-subprojects
Add support for using git submodules as subprojects
2017-03-25 18:24:38 +02:00
Nirbheek Chauhan d5975cc683 wrap: Implement special wrap modes for use by packagers
Special wrap modes:
  nofallback: Don't download wraps for dependency() fallbacks
  nodownload: Don't download wraps for all subproject() calls

Subprojects are used for two purposes:
1. To download and build dependencies by using .wrap files if they
   are not provided by the system. This is usually expressed via
   dependency(..., fallback: ...).
2. To download and build 'copylibs' which are meant to be used by
   copying into your project. This is always done with an explicit
   subproject() call.

--wrap-mode=nofallback will never do (1)
--wrap-mode=nodownload will do neither (1) nor (2)

If you are building from a release tarball, you should be able to
safely use 'nodownload' since upstream is expected to ship all
required sources with the tarball.

If you are building from a git repository, you will want to use
'nofallback' so that any 'copylib' wraps will be download as
subprojects.

Note that these options do not affect subprojects that are git
submodules since those are only usable in git repositories, and you
almost always want to download them.
2017-03-25 06:57:30 +05:30
Nicolas Schneider 92ed607290 add 'vs' backend that automatically chooses between the vs backends
For newer VS versions, we can simply rely on 'VisualStudioVersion' being
set in the environment.
For VS2010, we fall back to check 'VSINSTALLDIR' for the version string.
If the backend can not be auto detected, we raise an exception to make the
user choose an explicit backend.
We also print the detected backend to the meson log.
2017-03-23 10:34:32 +01:00
Nicolas Schneider 994696e0ad add vs2017 backend
VS2017 requires the 'WindowsTargetPlatformVersion' property to be set.
We gather the version to use from the environment variable
'WindowsSDKVersion' that will be set by the VS developer command prompt.
2017-03-22 11:05:28 +01:00
Jussi Pakkanen bf1b6b2d2e Update version number for new development. 2017-03-15 23:30:25 +02:00
Jussi Pakkanen 8ce7412b35 Set version number for bugfix release. 2017-03-15 22:57:53 +02:00
Jussi Pakkanen 48d371bd19 Bump version number for new development. 2017-03-05 23:46:21 +02:00
Jussi Pakkanen b63cdc8395 Increment version number for release. 2017-03-05 23:09:33 +02:00
Hemmo Nieminen cda24a641d Don't forbid "test:" as a target name anymore. 2017-02-17 15:40:29 -05:00