Commit Graph

336 Commits

Author SHA1 Message Date
Michael Hirsch, Ph.D 554d35c3f3
add get_external_property to replace get_cross_property 2020-02-05 13:23:55 -05:00
Michael Hirsch, Ph.D 6c963726cf
add native-file properties tests 2020-02-05 13:23:55 -05:00
Xavier Claessens 15eb0014ac interpreter: Iterate custom target outputs 2020-02-04 21:28:32 +02:00
Jussi Pakkanen a51c9af921
Merge pull request #6423 from dcbaker/declare-dependency-variables
Add ability to set and query arbitrary variables on declare_dependency objects
2020-01-27 18:29:22 +02:00
Xavier Claessens b74ece344f Support multiple args to message() and warning() 2020-01-26 07:51:16 -05:00
Jussi Pakkanen 254cb3209d Set source and build dir envvars when running dist. 2020-01-23 02:25:52 +02:00
Dylan Baker 202c89d0b6 docs: Add documentation for variables keyword
In declare_dependency() and dependency.get_variables().
2020-01-09 11:02:17 -08:00
Xavier Claessens e5297aeca5 summary: Change 'section' to be a kwarg instead of positional
Fixes: #6372.
2019-12-19 14:19:39 -05:00
Michael Hirsch, Ph.D 5695dc0f16 add compiler.get_linker_id() method
this can be useful for if/elif where linker behaviors must be
considered.

For example, clang with "link" vs gcc with "ld.bfd" etc.

ci for compiler.get_linker_id() method

doc

add @FeatureNew check

Co-Authored-By: Daniel Mensinger <daniel@mensinger-ka.de>
2019-12-19 12:03:55 -05:00
Xavier Claessens 38953d8ee3 summary: Add bool_yn keyword argument 2019-12-12 18:30:17 -05:00
Xavier Claessens 49082f9669 summary: Allow section with no title, and passing key/value separately 2019-12-12 18:30:17 -05:00
Xavier Claessens 6e865a2330 Add a summary() function for configuration summarization
Based on patch from Dylan Baker.

Fixes #757
2019-12-12 18:30:17 -05:00
Xavier Claessens 552e78da4d assert(): Make message argument optional 2019-12-10 18:02:41 +02:00
Michael Hirsch, Ph.D ee241f2aab mtest: document default MALLOC_PERTURB_=1..255 behavior [skip ci]
This default behavior can have surprising and time-consuming outcomes.
I was wondering why certain tests using several external, fixed libraries
would fail only with Meson and not with CMake or manual runs.
It turned out mtest.py enables MALLOC_PERTURB_ by default, which is
surprising--a topic for another Issue/PR.

At least, this surprising default is documented with workarounds.
2019-12-06 14:35:36 +02:00
Xavier Claessens b872099468 find_program(): Add 'dirs' keyword argument
Fixes: #1576
2019-12-05 16:52:22 -05:00
chris 6cc0ef8c07
docs: fix typo 2019-11-29 18:08:15 +01:00
Robert Ancell dd15c47ea8
docs: Fix typo [skip ci] 2019-11-27 20:23:20 -05:00
Wolfgang Stöggl f037e7ef45 Fix typos found by codespell
- Typos were found by codespell v1.16.0
2019-11-06 09:55:30 -05:00
rc-matthew-l-weber 6e18e5b0b3 docs: clarify --default-library is for internal libraries [skip ci]
Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
2019-10-28 00:07:50 +02:00
Anton Leontiev 603b1ac287 docs: Fix some incorrect links [skip ci] 2019-10-19 19:14:10 +03:00
Anton Leontiev ddd7cf634b docs: Add missing language identifier [skip ci] 2019-10-19 19:14:10 +03:00
Jussi Pakkanen 51fef880b6
Merge pull request #5953 from mensinda/isystem
Add is_system to dependency
2019-10-06 17:33:12 +03:00
Daniel Mensinger 73d52266b5
Use include_type instead of is_system 2019-10-03 10:06:04 +02:00
Daniel Mensinger 942f145de9
added docs 2019-10-03 10:06:04 +02:00
Dylan Baker 678ee8a9c1 docs: update docs on benchmark in regards to arguments accepted 2019-10-02 13:50:25 -07:00
Marc-André Lureau 01569fee2e Add depfile to configure_file()
In qemu, minikconf generates a depfile that meson could use to
automatically reconfigure on dependency change.

Note: someone clever can perhaps find a way to express this with a
ninja rule & depfile=. I didn't manage, so I wrote a simple depfile
parser.
2019-09-30 22:17:50 +03:00
Marc-André Lureau a65d5801f3 environment: Support taking values from dict
Related to #5955.
2019-09-29 08:42:53 -04:00
David Cantrell fbbdde4561 Clarify the list of languages is optional for project() [skip ci] 2019-09-26 20:26:14 +03:00
Khairul Azhar Kasmiran 6b0c711c91 Add Windows behavior to executable()'s install_rpath arg doc [skip ci] 2019-09-23 13:27:10 -04:00
Xavier Claessens ef3992f1cc configure_file(): Allow multiple inputs in command mode
Closes: #5893
2019-09-17 13:05:40 -04:00
Peter Hutterer 4ebce2c3f2 Add test priorities to force test start order 2019-08-24 21:26:41 +03:00
James Hilliard b21fd95f73 Add is_disabler function
This is useful if one needs to check if a variable is a disabler.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2019-08-12 01:05:45 +03:00
ePirat 84030abd31 Docs: Add default value of install kwarg [skip-ci] 2019-07-30 18:23:07 +03:00
Dylan Baker 487fdfcd11 docs: Add missing closing ` in reference manual 2019-07-26 12:06:47 +00:00
Michael Hirsch, Ph.D 49dd56b312 add missing link [skip ci] 2019-07-26 11:57:47 +03:00
Michael Hirsch, Ph.D b90b69d383 note that integers have .to_string() method [skip ci] 2019-07-26 11:57:47 +03:00
Xavier Claessens 2e41d53e4d Add version check support to find_program()
Closes: #1609
2019-07-19 08:55:50 -04:00
Marc-André Lureau 341d245e68 Accept vs_module_defs for modules
Like shared libraries, modules may have vs_module_defs.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2019-07-17 19:19:56 +03:00
Xavier Claessens 12d4031f52 Add alias_target() function 2019-07-10 15:01:18 -04:00
Xavier Claessens dd8f75ad93
Document that add_languages() returns a boolean [skip ci] (#5600) 2019-07-05 14:19:04 -04:00
andy5995 ceb70a5c2e Reference-manual.md:add missing equal sign in "both_libraries" section
[skip ci]
2019-06-19 00:03:36 +03:00
Dylan Baker 0e23dbec81 docs: compiler objects are returned [skip ci]
Not a series problem, but annoys me that that it's in the builtin
section when it's a returned object.
2019-06-10 23:48:27 +03:00
Jussi Pakkanen 6b4b601eaf Rewrap some doc lines. [skip ci] 2019-06-10 01:46:55 +03:00
Daniel Mensinger 438ee6b01d
cmake: updated docs 2019-06-06 18:27:05 +02:00
Daniel Mensinger 35936316eb
cmake: rebase fixes 2019-06-06 18:27:04 +02:00
Daniel Mensinger 6cb904de7b
cmake: Added docs 2019-06-06 18:27:03 +02:00
Mathieu Duponchelle 12a82e763d interpreter: add fallback argument to subproject.get_variable() 2019-05-28 20:26:54 +03:00
Michael Hirsch, Ph.D 44b6ccbe56 join_paths => / [skip ci] 2019-05-22 23:56:50 +03:00
Jussi Pakkanen e9bd7d49bd
Merge pull request #5372 from dcbaker/get_variable
Dependency.get_variable method
2019-05-21 21:57:05 +03:00
Jussi Pakkanen 79d530e325 Generators can have extra target dependencies. Closes #4131. 2019-05-20 23:38:13 +03:00
Dylan Baker ffe2a678d5 docs: Add docs for Dependency.get_variable 2019-05-20 10:41:11 -07:00
Daniel Eklöf c2ee82cc41 add support for "target_type: 'shared_module'" in build_target() 2019-05-09 22:43:10 +03:00
Michael Hirsch, Ph.D 06bfc2dab6 per-target manual specification of link_language 2019-05-02 23:26:51 +03:00
Anton Kochkov ad0ba6a911 Add VS2019 backend CI and docs. 2019-04-16 00:11:02 +03:00
Keefer Rourke 53a7403f10 (#5260) link to builtin options in `library()` fn
As a newcomer to the Meson build system, I found the documentation of the `library()` function to be a bit misleading. Eventually I found what 'user option' referred to after digging through the docs.

This just adds a link back to the page that describes the options that are referred to in this paragraph.
2019-04-15 20:39:16 +03:00
Dylan Baker 02ff9829c4 docs: Change 0.51 to 0.50.1 [skip ci]
Since this is targeting the 0.50.1 bugfix release.
2019-04-10 19:30:18 +03:00
Jussi Pakkanen 5905533fcd
Merge pull request #5103 from mesonbuild/linkcustom
Can link against custom targets
2019-04-01 01:29:51 +03:00
Jonatan Pålsson 2a030e33f3 docs: Document when environment() was added (#5178) [skip ci]
The environment() function was added in 0.35.0 (which contains a2e7ebc5,
containing the actual addition)
2019-03-30 09:28:04 +00:00
Dylan Baker f2d4a32370 dependencies/base: Pass correct arguments to subdependencies
Currently InternalDependency.get_partial_dependency shadows the the
input variables names, and then passes those new copies to the final
object returned. It also passes them to the arguments of of
get_partial_dependency for each subdependency, which is wrong. The
code is supposed to proxy the original argumetn values to that instead
of the shadowing values.

To avoid that this patch renames the new values.
2019-03-29 21:27:54 +00:00
Jussi Pakkanen 2259db2683 Add documentation. 2019-03-28 23:11:30 +02:00
Jussi Pakkanen 4b95dd3a6d Add test script to generate a static library with a custom target. 2019-03-18 22:01:06 +02:00
Niklas Claesson dd2c44cdf6 Add static as keyword to find_library 2019-03-11 20:56:52 +02:00
Paolo Bonzini 91f847d308 mtest: implement TAP parsing
This provides an initial support for parsing TAP output.  It detects failures
and skipped tests without relying on exit code, as well as early termination
of the test due to an error or a crash.

For now, subtests are not recorded in the TestRun object.  However, because the
TAP output goes on stdout, it is printed by --print-errorlogs when a test does
not behave as expected.  Handling subtests as TestRuns, and serializing them
to JSON, can be added later.

The parser was written specifically for Meson, and comes with its own
test suite.

Fixes #2923.
2019-03-02 09:07:54 +01:00
Paolo Bonzini 4b5cf3f7c5 interpreter: add "protocol" kwarg to test
This is the first step towards adding support for TAP.
2019-03-02 09:07:54 +01:00
emersion 06e939bcbb docs: compiled() only works with compiler.run() results [skip ci] 2019-02-25 00:21:26 +02:00
Maarten ter Huurne b4ef257593 Clarify in docs the argument types extract_objects() accepts [skip ci] 2019-02-19 22:42:12 -05:00
Jonathan Poelen f424bdaf33 use compile_args instead of compiler_args [skip ci] 2019-02-18 21:59:10 +02:00
Jan Tojnar 33d82201bd run_command: add env kwarg 2019-01-27 19:24:15 +02:00
Luca Boccassi 267792174c custom_target: do not let install override build_by_default
A custom_target, if install is set to true, will always be built by
default even if build_by_default is explicitly set to false.
Ensure that this does not happen if it's set explicitly. To keep
backward compatibility, if build_by_default is not set explicitly and
install is true, set build_by_default to true.

Fixes #4107
2019-01-17 20:40:19 +02:00
Marco Trevisan (Treviño) 95c1cdf776 interpreter: obey to the install argument in configure_file
If a configure_file has an install_dir set, the supported install
argument is ignored, while this should have actually higher priority
than the install_dir itself.
Also check that correct types are used for `install` and `install_dir`.

Add test to verify this.

Fixes #3983
2019-01-13 19:51:31 +02:00
Ethan R 530aec0bbe Added Rust to supported languages for project() (#4750) [skip ci] 2019-01-09 23:46:38 +05:30
Dylan Baker 6c76b92dff docs: document the native keyword argument for reference-manule [skip ci] 2019-01-07 22:56:17 +02:00
Jussi Pakkanen 3a6e2aeed9 Can use plain strings for include_directories. 2019-01-02 22:29:08 +02:00
Xavier Claessens b6cede2928 find_library: Add 'has_headers' kwarg
A library without its headers is often useless, so it is common to check
them together.
2018-12-27 23:06:28 -05:00
Xavier Claessens ff2aa5a9ef Add 'required' kwarg in header check functions
Closes: #3940
2018-12-24 11:12:11 -05:00
Jussi Pakkanen 4df9006ca4 Can specify a string to print when dep not found. Closes #2407. 2018-12-22 19:00:40 +02:00
Dylan Baker 05fc81ac35 docs: Add warning about not using join_paths() with build targets [skip ci]
This comes up now and again when people try do do something like:

meson.build:
```meson
my_sources = ['foo.c']
subdir('subdir')
executable('foo', my_sources)
```
subdir/meson.build:
```meson
my_sources += ['bar.c']
```
2018-12-19 01:25:17 +02:00
Nirbheek Chauhan d42a3ae05f Document dependency().name() added in 0.48 [skip ci]
Closes https://github.com/mesonbuild/meson/issues/3351
2018-12-17 21:03:57 +05:30
Lzu Tao 0c33c7ca8a Add note for install_man in Reference-manual [skip ci] 2018-12-16 16:42:50 +02:00
Simon Arlott f77ead26eb docs: build_always_stale was added in 0.47 [skip ci] 2018-12-10 20:21:55 +02:00
Nirbheek Chauhan 55d79a6ba2 docs: Misc syntax fixes and missing links [skip ci] 2018-12-05 02:40:34 +00:00
Nirbheek Chauhan c502ddfebf docs: Document subproject(... required: false) [skip ci]
Somehow this was missed in the original PR #3885
2018-12-05 02:40:34 +00:00
Nirbheek Chauhan febd3e8524
Document how to declare fallback-only dependencies [skip ci] 2018-12-05 07:44:27 +05:30
Daniel Mensinger a0175ecb14 CMake find_package dependency backend (#4444) 2018-11-22 22:30:12 +02:00
Stian Selnes 0821462ce3 Add kwarg is_default to add_test_setup()
is_default may be used to set the name of the test setup that will be
used by default whenever the option --setup is not given.

Fixes #4430
2018-11-12 16:23:59 +05:30
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
Nirbheek Chauhan 1c2cfe4529 docs: Fix gcc attribute list link [skip ci] 2018-10-27 23:11:44 +01:00
Dylan Baker 1e054ad2b9 docs: Fix hotdoc warnings [skip ci]
Hotdoc really wants internal links to point to the .md files instead of
the generated names. Which makes sense, as we're currently relying on
the fact that meson only generated .html pages.
2018-10-27 16:07:14 +03: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
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
Jon Turney 648b2c5799 Document the no_builtin_args argument of Compiler object methods [skip ci] 2018-10-20 00:48:00 +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 b9e405c634 doc: Add missing assert() function [skip ci] 2018-10-12 22:25:40 +03:00
Xavier Claessens 38a6582145 configure_file: Support taking values from a dict
Closes #4218
2018-10-08 21:03:32 +03:00
Jan Tojnar c0c075c129 Make custom dist scripts accept arguments.
meson.add_dist_script, introduced in #3906, did not accept any arguments
other than script name. Since all other meson.add_*_script methods
do accept args, this makes the dist script accept them as well.
2018-10-04 21:20:57 +03:00
Mike Gilbert 019a627f04 Document the compiler.cmd_array() method 2018-10-04 21:19:03 +03:00
Nirbheek Chauhan 31e1e524ca
Document when console: kwarg was added [skip ci] 2018-10-03 18:35:35 +05:30
Ari Vuollet c4b885bfd1 docs: Document conditional debug compilation flags [skip ci] 2018-09-27 17:49:48 +03:00
ePirat 80721b7605 Docs: Add DEPFILE to substitutions list [ci skip] 2018-09-25 20:37:33 -07:00