Commit Graph

305 Commits

Author SHA1 Message Date
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