Commit Graph

305 Commits

Author SHA1 Message Date
Dylan Baker 63f4f9481e Add new compiler.get_argument_syntax method
Some compilers try very had to pretend they're another compiler (ICC
pretends to be GCC and Linux and MacOS, and MSVC on windows), Clang
behaves much like GCC, but now also has clang-cl, which behaves like MSVC.

This method provides an easy way to determine whether testing for MSVC
like arguments `/w1234` or gcc like arguments `-Wfoo` are likely to
succeed, without having to check for dozens of compilers and the host
operating system, (as you would otherwise have to do with ICC).
2018-11-03 18:10:36 +02:00
Jussi Pakkanen 23ed0e1857 Make string division do path joining. 2018-11-02 21:02:25 +02:00
Xavier Claessens 61348da069 Add 'disabler' argument to functions returning not-found objects
When dependency(), find_library(), find_program(), or
python.find_installation() return a not-found object and disabler is
true, they return a Disabler object instead.
2018-10-23 22:09:55 +03:00
Nicole Mazzuca f1546e289c add cpp_std support for MSVC 2018-10-22 19:14:00 +03:00
Michał Górny e8232c7825 Remove implicit compression of man pages
Remove the code responsible for implicitly compressing manpages as .gz
files.  It has been established that manpage compression is a distro
packager's task, with existing distros already having their own
implementations of compression.

Fixes #4330
2018-10-20 13:16:28 +03:00
Xavier Claessens c453400d59 Add 'b_pie' compiler option
On Android executables must be position independent, many
distributions enable it by default too for security reasons.
2018-10-20 00:47:27 +03:00
Xavier Claessens b6fc063b13 Add documentation and release notes for 'in', 'continue' and 'break' 2018-10-04 20:18:56 -04:00
Jussi Pakkanen 0cf4a6ab3a Updated release note page. 2018-09-22 23:11:59 +03:00
Xavier Claessens bbac77c31f Doc: Deprecate python3 module [skip ci]
The new 'python' module is a superset of its features, keeping both is
confusing.

Closes #4168.
2018-09-18 11:50:45 -07:00
Andrei Alexeyev 67cc636e53 Add 'clone-recursive' option for git wraps
This causes Meson to clone the repo with the --recursive flag, pulling
all of the submodules automatically.
2018-09-16 14:57:56 +03:00
Jon Turney 8b3ad3e9a0 Add a release note snippet
Also tweak releated documentation
2018-09-12 15:38:00 +01:00
Dylan Baker 51e9db370a Add method to check for C/C++ function attributes
It's fairly common on Linux and *BSD platforms to check for these
attributes existence, so it makes sense to me to have this checking
build into meson itself. Autotools also has a builtin for handling
these, and by building them in we can short circuit cases that we know
that these don't exist (MSVC).

Additionally this adds support for two common MSVC __declspec
attributes, dllimport and dllexport. This implements the declspec
version (even though GCC has an __attribute__ version that both it and
clang support), since GCC and Clang support the MSVC version as well.
Thus it seems reasonable to assume that most projects will use the
__declspec version over teh __attribute__ version.
2018-09-07 11:52:15 -07:00
Xavier Claessens ef231d3edd Add --fatal-meson-warnings command line option
This makes any warning message printed by meson raise an exception,
intended to be used by CI and developpers to easily catch deprecation
warnings and other potential issues.
2018-09-04 09:01:39 -04:00
Corentin Noël b350c74386 i18n: add release note snippet 2018-09-03 22:34:22 -07:00
Rafael Ávila de Espíndola 07d2d88fa9 Allow override_find_program to use an executable.
With this it is now possible to do

foobar = executable('foobar', ...)
meson.override_find_program('foobar', foobar)

Which is convenient for a project like protobuf which produces both a
dependency and a tool. If protobuf is updated to use
override_find_program, it can be used as

protobuf_dep = dependency('protobuf', version : '>=3.3.1',
                          fallback : ['protobuf', 'protobuf_dep'])
protoc_prog = find_program('protoc')
2018-09-03 21:24:01 +03:00
Nirbheek Chauhan bead8287a5 Improve support for macOS dylib versioning
We now use the soversion to set compatibility_version and
current_version by default. This is the only sane thing we can do by
default because of the restrictions on the values that can be used for
compatibility and current version.

Users can override this value with the `darwin_versions:` kwarg, which
can be a single value or a two-element list of values. The first one
is the compatibility version and the second is the current version.

Fixes https://github.com/mesonbuild/meson/issues/3555
Fixes https://github.com/mesonbuild/meson/issues/1451
2018-08-29 15:51:23 -07:00
Jussi Pakkanen b86f2fd17f
Merge pull request #4016 from thiblahute/hotdoc
modules: Add an 'hotdoc' module
2018-08-29 21:18:26 +03:00
Thibault Saunier 1ea743a0bf hotdoc: Add documentation 2018-08-28 18:18:40 -03:00
Jussi Pakkanen fb770e1e3d Add support for custom dist scripts. 2018-08-27 23:35:29 +03:00
Jon Turney 7fff8318f5
Add a release note snippet
Also adjust relevant documentation
2018-08-26 17:23:39 +01:00
Jussi Pakkanen 54aed1a92c Added "native" kwarg to add_XXX_args. Closes #3669. 2018-08-22 23:22:48 +03:00
Jussi Pakkanen d83f77109a
Convert buildtype to optimization and debug options (#3489) 2018-08-18 20:39:47 +03:00
Xavier Claessens 4f088365e4 interpreter: Add support for dict addition 2018-08-14 23:46:42 +03:00
Jussi Pakkanen 9b3671e711
Merge pull request #4000 from MathieuDuponchelle/gir_multiple_libs
gnome.generate_gir: refactor and allow passing multiple libraries
2018-08-12 14:07:40 +03:00
Jussi Pakkanen 7aeb90a55e Typo fix. [skip ci] 2018-08-11 20:11:17 +03:00
Jussi Pakkanen fb2cdd0fe2 Call it gnu_symbol_visibility instead. 2018-08-09 19:46:49 +03:00
Jussi Pakkanen d7d948db0d Update documentation for symbol visibility. 2018-08-09 19:46:49 +03:00
Mathieu Duponchelle 6ea939dd5f gnome.generate_gir: support generating gir for multiple libraries
Fixes #3688
2018-08-09 17:34:55 +02:00
Jussi Pakkanen e7eb387da8 Be more general in description. [skip ci] 2018-07-31 19:40:34 +03:00
Nirbheek Chauhan a2dab5439c custom targets: Add a 'console' kwarg for long-running commands
Ninja buffers all commands and prints them only after they are
complete. Because of this, long-running commands such as `cargo
build` show no output at all and it's impossible to know if the
command is merely taking too long or is stuck somewhere.

To cater to such use-cases, Ninja has a 'pool' with depth 1 called
'console', and all processes in this pool have the following
properties:

1. stdout is connected to the program, so output can be seen in
   real-time
2. The output of all other commands is buffered and displayed after
   a command in this pool finishes running
3. Commands in this pool are executed serially (normal commands
   continue to run in the background)

This feature is available since Ninja v1.5

https://ninja-build.org/manual.html#_the_literal_console_literal_pool
2018-07-31 19:38:54 +03:00
Christoph Behle 9cf38700d8 Add release snippet 2018-07-07 21:20:23 +02:00
Jussi Pakkanen 5d08219464 Update everything for new release. 2018-07-02 20:50:56 +03:00
Nirbheek Chauhan d6a9b4cc79 Contributing.md: Document procedure for new features [skip ci] 2018-07-02 19:52:53 +05:30
Dylan Baker f3a8f9c34d Options: treat array option -Dopt= and -Dopt=[] as equivalent
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-29 10:56:25 +00:00
Vasu Penugonda 7140afc0a8 Added ARMCLANG compiler support for C/C++ (#3717) 2018-06-21 00:55:39 +03:00
Jussi Pakkanen c6431fe47e Added documentation. 2018-06-20 20:38:26 +03:00
Jon Turney c0f59399e4 Add a depends: keyword to windows.compile_resources()
Expose depends: from the custom_target this creates.
2018-06-18 10:52:21 +00:00
Nirbheek Chauhan c9a89027ac run_command: Add new kwarg 'capture'
capture: false means we won't try to read the stdout at all.

Closes https://github.com/mesonbuild/meson/issues/3364
2018-06-18 10:51:46 +00:00
Alex Hirsch cbe18e01e4 Deprecate `build_always`, add `build_always_stale`
Since `build_always` also adds a target to the set of default targets,
this option is marked deprecated in favour of the new option
`build_always_stale`.

`build_always_stale` *only* marks the target to be always considered out
of date, but does *not* add it to the set of default targets.

The old behaviour can still be achieved by combining
`build_always_stale` with `build_by_default`.

fixes #1942
2018-06-18 10:49:40 +00:00
Xavier Claessens e565945253 Add UserFeatureOption type
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-18 04:57:32 +00:00
Sander Sweers ec616c2aa5 configure_file: Add release snippet for encoding keyword 2018-06-09 18:17:48 +00:00
Robert Ancell 6461d4cda2 docs: Add release notes for new gnome.gdbus_codegen keywords 2018-06-08 12:36:50 +00:00
Nirbheek Chauhan 0565262be3 Add documentation for Builtin options and bitcode
Also add a test that ensures that new base options and compiler options
are always documented.
2018-06-06 07:53:10 +00:00
Nirbheek Chauhan c3ffc1a249 docs: Add a release notes snippet about FeatureNew 2018-06-05 15:57:57 +00:00
Jon Turney 7a15214a69 Have the windows.resource_compiler() preprocesor write a depfile
When using binutils's windres, we can instruct it to invoke the preprocessor
in such a way that it writes a depfile, so that dependencies on #included
files are automatically tracked.

Not implemented for MSVC tools, so skip testing it in that case.
2018-06-03 21:06:23 +00:00
Jon Turney 7e08e958c0 Allow substitutions in custom_target() depfile:
Allow substitutions in custom_target() depfile: as well as in command:
2018-06-03 21:06:23 +00:00
Filipe Brandenburger 968f2c63af Add release-notes snippet for the extended install_mode 2018-06-02 04:50:32 +00:00
Jon Turney aa27f7cec9 Add a depend_files: keyword to windows.compile_resources()
Expose depend_files: from the custom_target this creates.

This is the change suggested in #2815, with tests and documentation added.

Fixes #2789 (duplicate #2830)
2018-06-01 20:21:09 +00:00
Mathieu Duponchelle 14750b50ea configure_file: Add output_format kwarg (#3636)
* configure_file: Add output_format kwarg

* docs: Reference-manual.md output_format was added in 0.47 [skip ci]
2018-06-01 17:53:07 +00:00
Nirbheek Chauhan 27b290d6df Add check_header to Reference manual and release notes [skip ci] 2018-05-30 15:25:39 +05:30
Filipe Brandenburger 5572bbc6cc Document octal and binary integer literals in syntax.
Also add a release notes snippet for it.
2018-05-23 14:07:56 -07:00
Jussi Pakkanen 55a0831bc3
Merge pull request #3383 from mesonbuild/nirbheek/configure-file-nodata
configure_file: Add a new action 'copy'
2018-05-22 21:09:19 +03:00
Jussi Pakkanen 9ecd92c6fe
Merge pull request #3490 from MathieuDuponchelle/dict_builtin
Add new built-in type, dict
2018-05-22 20:46:26 +03:00
Andrei Alexeyev d72f9a3e0f
Add 'check' kwarg for run_command
Closes #3516
2018-05-22 04:45:31 +03:00
Nirbheek Chauhan 4b9393e165 docs: Add manual entry for configure_file copy kwarg 2018-05-22 02:37:07 +05:30
Mathieu Duponchelle 10e7566ed8 dict: fix CI issues 2018-05-21 00:19:31 +02:00
Mathieu Duponchelle 1de7dce414 dict: Document, add release snippet 2018-05-20 22:39:33 +02: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 ade59f987f Updated version number for new release. 2018-04-23 03:24:26 +03:00
Nirbheek Chauhan a5b99dce5d Add more tests for multi-line strings and update docs 2018-04-21 22:57:19 +03:00
Xavier Claessens 9a82b0136a extract_all_objects: Add 'recursive' keyword argument
To maintain backward compatibility we cannot add recursive objects by
default. Print a warning when there are recursive objects to be pulled
and the argument is not set. After a while we'll do pull recursive
objects by default.
2018-04-18 14:54:52 -04:00
Filipe Brandenburger a98e9a1b70 Add release-notes snippet for install_umask 2018-04-18 11:44:54 -07:00
Jussi Pakkanen 628f910760
Merge pull request #3314 from sarum9in/test_depends
Add test(depends) keyword parameter
2018-04-18 00:40:52 +03:00
Dylan Baker 92487ea33d Add partial_dependency method to dependencies
This adds a new method, partial_dependency to all dependencies. These
sub dependencies are copies of the original dependency, but with one or
more of the attributes replaced with an empty list. This allows creating
a sub dependency that has only cflags or drops link_arguments, for
example.
2018-04-17 23:33:31 +03:00
Jussi Pakkanen 1952ef5ae1
Merge pull request #3243 from dcbaker/accept-d-setup
Accept -D for meson level options durring initial configuration
2018-04-17 23:29:15 +03:00
Jussi Pakkanen 8ee1e49ae6
Merge pull request #3353 from xclaesse/has-link-argument
Add has_link_argument() and friends
2018-04-17 23:26:53 +03:00
Jussi Pakkanen 3fc1ca8687
Merge pull request #3240 from MathieuDuponchelle/python_module
Implement a generic python module
2018-04-17 23:17:43 +03:00
Jussi Pakkanen 88ca3805e7
Merge pull request #1852 from QuLogic/openmp
Add an OpenMP dependency.
2018-04-17 21:39:13 +03:00
Dylan Baker 1c48cc08e0 mconf: accept -- options like `meson` does
I'm not really happy about this to be honest, I don't like having both
-- and -D options, I think it's stupid to have two ways to do exactly
the same thing, especially since we then have to validate that someone
hasn't passed the argument both ways.

However, other people want this, so here it is.

Fixes #969
2018-04-17 11:32:26 -07:00
Dylan Baker 78e37c4953 Accept builtin options with -D when making initial meson call
Currently meson only accepts `-Dopt=value` for builtin options when
calling `meson configure` and `--opt=value` for builtin options when
calling `meson` initially. This is a confusing behavior, and users only
get a small warning at the top of a potentially long configuration
summary to catch this.

This has confused end users and developers alike, there are at least 5
duplicates of the bug this fixes, and I have personally been asked about
this more times than I can count. The help documentation doesn't make
it clear that -D cannot be used to set options like prefix and bindir.

This adds support for -D options to the initial meson call, but not --
options to the meson configure call. I think it's better to have one way
to do things, and -- options are kinda one off while -D is used
everywhere else, so lets stick with that.

Related #969
2018-04-17 11:32:26 -07:00
Niklas Claesson b42dd7df0a Add release snippet 2018-04-17 09:55:34 +00:00
Elliott Sales de Andrade 46ccbe48e7 Add release note for OpenMP dependency. 2018-04-17 02:04:39 -04:00
Xavier Claessens bd37afeeea Add has_link_argument() and friends
Closes: #3335.
2018-04-16 19:14:02 -04:00
Aleksey Filippov a64d16c6bb Add build snippet for non-unique-target-names feature 2018-04-16 23:18:26 +01:00
Jussi Pakkanen c58dd64f8e Merged Arm CC support. 2018-04-16 23:02:09 +03:00
Jussi Pakkanen 0e00470d8c
Merge pull request #3218 from mesonbuild/findoverrider
Make it possible to override find_program [skip ci]
2018-04-16 22:22:02 +03:00
Jussi Pakkanen 86f725c1e5
Merge pull request #3115 from makise-homura/e2k-lcc-support
Support lcc compiler for e2k (Elbrus) architecture
2018-04-15 17:18:44 +03:00
Nirbheek Chauhan 0e6a332d0c Document that override_find_program works on configure_file [skip ci]
Also link to the release notes snippet from the Reference manual
2018-04-15 13:32:38 +05:30
Jussi Pakkanen f489aa77e5 Added documentation [skip ci] 2018-04-15 13:32:38 +05:30
Martin Hostettler 3f7c6cf3d6 Improve generation of pkg-config files for static only libraries.
Previously pkg-config files generated by the pkgconfig modules for static libraries
with dependencies could only be used in a dependencies with `static: true`.

This was caused by the dependencies only appearing in Libs.private even
if they are needed in the default linking mode. But a user of a
dependency should not have to know if the default linking mode is static
or dynamic; A dependency('somelib') call should always pull in all
needed pieces into the build.

Now for meson build static libraries passed via `libraries` to the generate
method automatically promote dependencies to public.
2018-04-14 23:43:29 +03:00
Nirbheek Chauhan 487526bfff Trivial update to meson vim syntax + typo in snippet [skip ci] 2018-04-11 22:07:11 +05:30
Mathieu Duponchelle 99f324eda1 [fixup]: Fix snippets heading 2018-04-10 00:39:25 +02:00
Mathieu Duponchelle 56fc22075c [fixup]: write documentation 2018-04-09 15:46:06 +02:00
Mathieu Duponchelle 31f0242a6f new wrap-mode: forcefallback
This can be useful to make sure that a project builds when
its fallbacks are used on systems where external dependencies
satisfy the version requirements, or to easily hack on the sources
of a dependency for which a fallback exists.
2018-04-06 23:48:48 +02: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
makise-homura 0bea50816b Removed non-latin characters from lcc snippet
It is supposed that it may become source of failures
while passing AppVeyor tests.
2018-03-29 21:55:48 +03:00
Xavier Claessens b4aee4675a pkgconfig: Add a simple version of the generator (#3284) 2018-03-29 01:19:42 +03:00
makise-homura 7c1132b681 Added lcc support release snippet 2018-03-28 21:58:06 +03:00
Somasekhar Penugonda e62b8109eb Updates to CPP support and update review changes 2018-03-27 17:04:26 -05:00
Aleksey Filippov 780d301c1c Add test(depends) documentation 2018-03-25 01:33:33 +00:00
Aleksey Filippov 5f81d36207 Add install_data() rename snippet 2018-03-19 22:13:41 +00:00
Jussi Pakkanen 24ae120868 Turn deprecated commands into errors. 2018-03-14 00:20:00 +02:00
Jussi Pakkanen a20c5ccd13 Fix snippet heading to conform to new formatting rules. 2018-03-13 00:06:12 +02:00
Jussi Pakkanen 6585427a7d
Merge pull request #3131 from sarum9in/pkgconfig
Pkgconfig accepts libraries and pkgconfig-dependencies in requires/requires_private parameters
2018-03-12 23:02:36 +02:00
Jukka Laurila 52c50da6c7 Refactor: Add log.error and log.exception to reduce code duplication. 2018-03-10 18:04:52 +02:00
Jussi Pakkanen e98ae58d0e
Merge pull request #3086 from sarum9in/declare-link-whole
Add declare_dependency() link_whole parameter
2018-03-06 21:08:54 +02:00
Evgenii Shatokhin 19718a8d9c Allow passing a compiler object to run_command()
Sometimes it is needed to run the current compiler with specific options
not to compile a file but rather to obtain additional info. For example,
GCC has several -print-* options to query it about the paths to
different libraries and development files. One use case is to get the
location of development files for GCC plugins, which is not easily
obtainable by other means:

  gcc -print-file-name=plugin

For this purpose, it would be convenient if the compiler object returned
by meson.get_compiler(lang) could be used in run_command() directly.
This commit implements it.

Signed-off-by: Evgenii Shatokhin <eshatokhin@virtuozzo.com>
2018-03-06 21:07:16 +02:00
Jukka Laurila 048508c989 Make "meson help" and "meson help <subcommand>" do the expected thing. 2018-03-06 14:02:55 +02:00
Aleksey Filippov 4de02cb5b0 Document declare_dependency() link_whole parameter 2018-03-06 01:44:26 +00:00
Jukka Laurila 8f340ffb8d Generate meson.build based on existing source files when meson init is run in a non-empty directory. 2018-03-06 00:05:17 +02:00
Jussi Pakkanen daaae647d7 Updated information for new release. 2018-03-04 20:27:34 +02:00
Hemmo Nieminen 4f8db1fe47 Add a release note snippet for the improved test setup selection. 2018-02-25 21:46:28 +02:00
Aleksey Filippov 2377f22ea5 Document pkgconfig.generate() requires parameters 2018-02-24 23:41:12 +00:00
Jussi Pakkanen 0b6f90caf7 Added release note snippet for csc support. 2018-02-25 01:16:06 +02:00
Adam C. Foltzer 3332f33649 Fix Rust compiler-private library ambiguity
When building a Rust target with Rust library dependencies, an
`--extern` argument is now specified to avoid ambiguity between the
dependency library, and any crates of the same name in `rustc`'s
private sysroot.

Includes an illustrative test case.
2018-02-22 22:16:58 +02:00
Peter Hutterer 6b550ae91f Allow for missing install_dir in install_data()
The documentation doesn't require it and the interpreter code works around the
possibility of it being None. The ninja backend code however fails with

File "/home/whot/code/meson/mesonbuild/backend/ninjabackend.py", line 796, in generate_data_install
    dstabs = os.path.join(subdir or None, plain_f)
File "/usr/lib64/python3.6/posixpath.py", line 78, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

If install_dir is missing, default to datadir/projectname
2018-02-22 20:26:16 +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 66b14e20cc
Merge pull request #3010 from sarum9in/elide_directory
Add strip_directory keyword for install_subdir() function
2018-02-05 22:34:09 +02:00
Jussi Pakkanen a288b524bc Add support for hex int literals. 2018-02-05 22:33:48 +02:00
Aleksey Filippov 549f9a41e5 Rename install_subdir() option elide_directory to strip_directory 2018-02-05 01:28:07 +00:00
Aleksey Filippov 8ca3cc0c3d Add elide_directory keyword for install_subdir() function
If elide_directory=true install_subdir() installs directory contents
instead of directory itself, eliding name of the source directory.

Closes #2869.
2018-02-05 01:28:07 +00:00
Jussi Pakkanen bfa6c8d074
Merge pull request #2938 from acfoltzer/rust-cross-merge
Add cross-compilation support for `rustc`
2018-02-04 00:44:09 +02:00
Jussi Pakkanen 80ac62c1a5 Added documentation to IceStorm module. 2018-02-02 20:30:14 +02:00
Martin Kelly 36aca4cd3c add meson.project_license() builtin
This Fixes #2941.
2018-01-31 23:54:28 +02:00
Adam C. Foltzer 1d81efb03d Add cross-compilation support for `rustc`
This patch is largely modeled on the relatively-straightforward code
for Fortran cross-compilation, so there might be some intricacies
missing.
2018-01-29 15:47:05 -08:00
Dylan Baker bcc3cbb93e dependencies: Allow setting config-tool binaries in cross file
This allows for much easier cross compiler configuration for tools like
LLVM. This patch does honor the 'native' keyword, and falls back to
searching PATH if the binary name is not specified.

I'd be fine with either removing the fallback behavior, or marking it as
deprecated and removing it later.

Fixes #2921
2018-01-30 06:45:58 +11:00
Jussi Pakkanen 59d0434039 Removed two deprecations from 2016. 2018-01-17 22:12:43 +02:00
Jussi Pakkanen a5b2b90309
Merge pull request #2815 from taisei-project/fix_windows_compile_resources
[windows] make compile_resources use custom targets instead of generators
2018-01-13 19:38:48 +02:00
Jussi Pakkanen d6bed2a77d
Merge pull request #2764 from mesonbuild/generatorpath
Generator outputs can have path segments
2018-01-13 19:00:38 +02:00
Andrei Alexeyev fd4236085b
Add a release note snippet for the windows.compile_resources() change 2018-01-12 23:52:25 +02:00
Jussi Pakkanen 4a189cf8c5 Add unit test that checks that the sample projects compile. 2017-12-31 23:24:29 +02:00
Jussi Pakkanen ac8d6087bf
Merge pull request #2334 from mesonbuild/promotedep
Add functionality to promote nested dependencies to top level.
2017-12-26 13:24:30 +02:00
Jussi Pakkanen 34c03719a3 Added documentation. 2017-12-18 21:10:14 +02:00
Jussi Pakkanen 46c071ea5c Add functionality to promote nested dependencies to top level. 2017-12-17 21:17:13 +02:00
Hemmo Nieminen d232a80e90 Allow value 'if-release' for b_ndebug project option. (#1896)
When set, NDEBUG will be automatically defined for for release builds but
not for other build types.
2017-12-17 21:06:06 +02:00
Jussi Pakkanen e674434389 Updated version number for new release. 2017-12-10 17:56:27 +02:00
Jon Turney 8d795a8403 Fix typo in release note snippet for get_unquoted
Grammar is still a bit fractured, but I'm not entirely sure what it's trying to say.
2017-12-09 01:51:29 +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 d3dcef7efc Added documentation for disabler objects. 2017-12-05 01:09:15 +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
Jussi Pakkanen 746e70c0da
Merge pull request #2512 from dcbaker/wip/config-tool-variables
Add method to get values from config tool based dependency
2017-11-28 22:01:00 +02:00
Jussi Pakkanen 5bc1009109 Add if_found kwarg to subdir(). 2017-11-27 23:22:47 +02:00
Dylan Baker a52c22dc06 docs: add documentation for config_tool variable method 2017-11-23 20:06:23 -08:00
Jussi Pakkanen f9e88cd37e Added release note mention of embedded Python in MSI packages. 2017-11-21 23:29:06 +02:00
Jussi Pakkanen 49eb33ff55
Merge pull request #2000 from t-chaik/tchaik/wip/get-unquoted
config data: add .get_unquoted() convenience method to get quoted string unquoted
2017-11-13 22:54:39 +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
Jussi Pakkanen 416a6fc235
Merge pull request #2444 from dcbaker/llvm
LLVM: Fix dynamic vs statically linking.
2017-11-08 21:16:50 +02:00
Paulo Antonio Alvarez 1540e615f1 interpreter: Add warning function 2017-10-31 22:17:01 +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
Leif Middelschulte 050a56ad47 Qt5-Module: Add `moc_extra_arguments` keyword support.
This commit adds support for an additional `moc_extra_arguments` keyword.
It becomes especially handy, when `moc`-ed sources conditionally provide
`slots`, depending on compile time macros (i.e. defines).
2017-10-25 21:09:16 +02:00
Dylan Baker 9a43cb367a docs: Add a snippet for LLVM static linking support 2017-10-25 10:14:46 -07:00
Jussi Pakkanen 683947d943 Collated release note snippets to main file. 2017-10-08 22:36:06 +03:00
Jussi Pakkanen 9483875798 Merge pull request #2397 from mesonbuild/prebuilt
Better support for prebuilt shared libs
2017-10-02 19:09:08 +03:00
Jussi Pakkanen ec45c29c9d Add rpath entries for all found libraries outside of system libraries. 2017-10-02 01:30:30 +03:00
Jussi Pakkanen 7d49d1d2d7 Merge pull request #2373 from leiflm/svn-wraps
introduce svn wrap support
2017-10-01 01:21:12 +03:00
Jussi Pakkanen b3362e350a Added release note snippet for prebuilt shared libs. 2017-09-30 18:25:33 +03:00
Dylan Baker dda5e8cadb Allow CustomTarget's to be indexed
This allows a CustomTarget to be indexed, and the resulting indexed
value (a CustomTargetIndex type), to be used as a source in other
targets. This will confer a dependency on the original target, but only
inserts the source file returning by index the original target's
outputs. This can allow a CustomTarget that creates both a header and a
code file to have it's outputs split, for example.

Fixes #1470
2017-09-27 22:01:24 +03:00
Leif Middelschulte 667d5d2d9f introduce svn wrap support 2017-09-25 22:26:42 +02:00
Martin Blanchard 26e731c7ca get-unquoted: Queue a release note entry mentioning the new method 2017-09-15 23:24:15 +02:00
Jussi Pakkanen 72a6683c6f Permit overriding find_program from the cross file. 2017-09-04 22:47:12 +03:00
Daniel Stone e1ffae0580 Add Compiler.get_supported_arguments()
Add a helper for the common pattern of:
  args_to_use = []
  foreach arg : candidate_args
    if cc.has_argument(arg)
      args_to_use += arg
    endif
  endforeach

Replaced with:
  args_to_use = cc.get_supported_arguments(candidate_args)
2017-08-31 20:24:20 +01:00