Philipp Ittershagen
a176588151
fix include_directories handling in subprojects for compiler tests.
2017-11-08 21:18:48 +02:00
Paulo Antonio Alvarez
1540e615f1
interpreter: Add warning function
2017-10-31 22:17:01 +02:00
Jussi Pakkanen
3faf35ac64
Merge pull request #2551 from mesonbuild/fix2481
...
Evaluate subproject directory name correctly
2017-10-31 01:06:15 +02:00
Martin Kelly
02bea7d5bf
namespace run_targets by subproject
...
Currently, run_target does not get namespaced for each subproject,
unlike executable and others. This means that two subprojects sharing
the same run_target name cause meson to crash.
Fix this by moving the subproject namespacing logic from the BuildTarget
class to the Target class.
2017-10-31 01:04:38 +02:00
Scott D Phillips
1b0048a702
run_command: add command and files as build dependencies
2017-10-29 18:43:17 +02:00
Jussi Pakkanen
53c1afffaf
Evaluate subproject path correctly. Closes #2481 .
2017-10-29 18:05:03 +02:00
Jussi Pakkanen
12df9c46f5
Check that link_with arguments in declare_dependency are not external dependencies.
2017-10-29 02:00:26 +03:00
Jussi Pakkanen
c178a5766b
Because people are very creative in working around limitations based on good faith.
2017-10-24 23:01:57 +03:00
Narendra Vardi
6083eb29d0
Do not allow escaping the subprojects directory.
...
Fixes #2306
2017-10-19 20:17:52 +03:00
liugang
36d85db5d4
fix all subproject using wrap-file broken
...
subproject using wrap-file is broken since commit (68bd64c
Prevent
projects from directly grabbing files from other subprojects. )
subproject with wrap-file usually have version number after name
- **sproj_name** is `zlib-1.2.8` according to `directory = zlib-1.2.8`
of zlib.wrap
- but **self.subproject** `zlib`
2017-10-14 18:09:13 +03:00
Jussi Pakkanen
68bd64cd38
Prevent projects from directly grabbing files from other subprojects.
2017-10-08 13:52:10 +03:00
Nirbheek Chauhan
bb0e18b738
Use listify and extract_as_list everywhere
...
They now flatten by default and unhold objects if required
Includes unit tests.
2017-10-01 22:27:48 +05:30
Nirbheek Chauhan
3a63f0d63c
interpreter: Add a new ObjectHolder class
...
Sets the held_object property and also implements a readable repr()
2017-10-01 12:07:04 +05:30
Jussi Pakkanen
1b442d11b4
Prevent projects from grabbing other projects' options.
2017-10-01 01:22:05 +03:00
Niklas Claesson
68275b32e8
Implement capture for generators
2017-09-29 23:29:44 +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
Jussi Pakkanen
dfc2b75ee2
Merge pull request #2348 from centricular/configure-file-infinite-loop
...
configure_file: Fix infinite loop in some cases
2017-09-26 21:46:55 +03:00
Nirbheek Chauhan
87327d414a
configure_file: Fix infinite loop in some cases
...
We were adding built files to the list of source files to check for
regen. We were also not adding sources files to regen when `command:`
was used.
Fixes #1865
2017-09-26 18:47:00 +05:30
Jussi Pakkanen
bea6b1a6f6
Merge pull request #2187 from centricular/fix-pcap-dependency
...
Fix pcap dependency, str.strip() now takes an argument, add cc.get_return_value()
2017-09-22 22:04:18 +03:00
Jussi Pakkanen
be0aa7fd74
Merge pull request #2357 from LukeShu/flake8
...
Bring into compliance with flake8
2017-09-22 21:33:34 +03:00
Jussi Pakkanen
2cbd917cf6
Merge pull request #2326 from dcbaker/use-link-compilers
...
Consider compilers used in static_library parents
2017-09-21 19:53:45 +03:00
Luke Shumaker
bb25260f00
flake8: Perform suggested whitespace/formatting changes
...
This only touches newlines, spaces, and (occaisionally) commas. Anything
else is left for another commit.
2017-09-21 11:59:03 -04:00
Thibault Saunier
96e24a50f9
Add cs_args as known args for csharp
2017-09-20 18:54:15 +03:00
Dylan Baker
59a90309ab
Fix error message for find_program if program cannot be found
...
Currently this raises an exception because exename is undefined.
2017-09-20 08:42:33 -07:00
Nirbheek Chauhan
59473e9ed7
Add a new compiler method: get_return_value()
...
This method accepts a single function that takes no arguments and
returns a single value which can be a value that can be cast to
a 64-bit signed integer, or a string, and returns that value.
Mostly useful for running foolib_version() functions that return the
currently-available version of libraries.
2017-09-20 13:36:42 +05:30
Alexis Jeandet
e553d0807b
Last round with listify function refactoring.
...
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-18 22:25:34 +02:00
Jussi Pakkanen
9c834a4ecd
Merge pull request #2310 from hvenev/reconfigure-get_option
...
Fix get_option() for base options on reconfigure.
2017-09-18 20:42:38 +03:00
Matthias Klumpp
61db415d7f
d: Make feature names less verbose
2017-09-17 21:36:13 +02:00
Hristo Venev
56c566a38e
Fix get_option() for base options on reconfigure.
2017-09-15 21:56:46 +01:00
Matthias Klumpp
75fdf413e4
Drop feature_args call in favor of letting pkgconfig do this directly
2017-09-12 17:33:22 +02:00
Matthias Klumpp
6cd3f066b4
d: Implement specific properties for D features
2017-09-12 17:32:03 +02:00
Matthias Klumpp
d83c289442
d: Add easy way to use D-specific features
...
Of course D compilers have different flags to set some important
D-specific settings. This adds a simple method to change these flags in
a compiler-agnostic way in Meson.
This replaces the previous `unittest_args` method with a more generic
variant.
2017-09-12 17:32:03 +02:00
Nirbheek Chauhan
aff981a6b0
Fix regression in test definitions
...
Caused by #2236 . Also add a test for this.
2017-09-10 17:41:37 +05:30
Jussi Pakkanen
9361666bd8
Merge pull request #2236 from trhd/env
...
Fix a stack trace caused by environment variables in test setups.
2017-09-06 23:13:55 +03:00
Jussi Pakkanen
72a6683c6f
Permit overriding find_program from the cross file.
2017-09-04 22:47:12 +03:00
Hemmo Nieminen
fa57295623
Fix a stack trace caused by environment variables in test setups.
...
An example trace:
[snip]
> File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
> result = self.fn(*self.args, **self.kwargs)
> File "/home/trhd/Projects/meson/mesonbuild/mtest.py", line 221, in run_single_test
> child_env.update(self.options.global_env.get_env(child_env))
> AttributeError: 'dict' object has no attribute 'get_env'
2017-09-01 01:07:20 +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
Thibault Saunier
596c7106f7
interpreter: Make cs_args a known argument
...
Avoiding warning about it when it is a well known one.
2017-08-24 15:30:20 -03:00
Jon Turney
9607abbe0d
Fix warning when executable(implib:) is used
...
PR #1955 added implib to known_exe_kwargs, but since PR #2001 it needs to be
in exe_kwargs as well, to avoid 'WARNING: Passed invalid keyword argument
"implib"' when it is used.
2017-08-18 12:09:40 +03:00
Jussi Pakkanen
50fb7d37ab
Make all functionality invokable via the main Meson binary,
...
which can be a Windows .exe file.
2017-08-18 12:08:20 +03:00
Jussi Pakkanen
33c2bbc6e8
Merge pull request #2191 from centricular/fix-ninja-clean-target-dir
...
Fix ninja clean in some edge cases + a bonus windows fix
2017-08-15 00:39:49 +03:00
Nirbheek Chauhan
be4428005d
ninja: Fix cleaning in various edge cases
...
We need to use target aliases for reserved target names and run
targets to workaround a ninja bug:
https://github.com/ninja-build/ninja/issues/828
Closes https://github.com/mesonbuild/meson/issues/1644
2017-08-15 01:38:01 +05:30
Jussi Pakkanen
4a766147fb
Printing unknown kwarg error message no longer crashes the parser.
2017-08-14 22:32:29 +03:00
Elliott Sales de Andrade
5cb1d00537
Allow excluding files from `install_subdir`
...
The install_subdir command now accepts a new `exclude` keyword argument
that allows specified files to be excluded from the installed
subdirectory.
2017-08-06 03:58:35 -04:00
Jussi Pakkanen
61a05f26e3
Add option to disable implicit include directories. Closes #2139 .
2017-08-05 00:26:13 +03:00
Jussi Pakkanen
d335a84b9e
A few more lgtm fixes.
2017-08-04 12:54:31 +03:00
Patrick Griffis
ece4ce8872
Fix test() accepting configure files for exe
2017-07-31 18:48:30 -04:00
Jussi Pakkanen
a572ebd2a1
Convert man inputs to Files so you can install_man the output of configure_file. Closes #2135 .
2017-07-31 18:47:09 -04:00
Jussi Pakkanen
bff37a90fc
Merged buildrpath branch.
2017-07-21 22:19:07 +03:00
Christoph Reiter
ceea746222
configure_file: warn in case a variable to subsitute is not present in the passed configuration. Fixes #2090
2017-07-21 20:11:50 +03:00