Commit Graph

9204 Commits

Author SHA1 Message Date
Jussi Pakkanen dee10c9151 Revert "coredata: init_builtins should always call libdir_cross_fixup"
This reverts commit cc4e9e79be.
2020-05-04 18:11:39 +03:00
GustavoLCR 27bbf37cf0
Fix incremental debug builds in VS 2020-05-04 02:21:20 +03:00
Jussi Pakkanen 9a6e79dc68
Merge pull request #7060 from dcbaker/install-script-targets
Allow meson.add_*_script to take additional types
2020-05-03 23:20:59 +03:00
Jussi Pakkanen 88ba5ffb84
Merge pull request #7059 from xclaesse/gir-windows
Fix gir on Windows
2020-05-03 20:31:48 +03:00
Michael Brockus 3ac437cecf
rm python2 %s from backends.py and ninjabackend.py 2020-05-03 14:00:15 +03:00
Daniel Mensinger b75dcd05c5 boost: Do not set BOOST_ALL_DYN_LINK (fixes #7056) 2020-05-03 13:58:52 +03:00
Jussi Pakkanen f8a04f0f76
Merge pull request #6838 from dcbaker/link-language-in-libraries
Link language in libraries
2020-05-02 01:57:09 +03:00
Princeton Ferro 30c4a7744f docs/Users: add Vala Language Server
See https://github.com/benwaffle/vala-language-server
2020-05-01 21:37:14 +02:00
Daniel Mensinger 59db1f18ea boost: Only use usage-requirements defines (fixes #7046) 2020-05-01 22:08:59 +03:00
Flow-It a124624c0e
Document formal Meson grammar [skip ci]
* WIP: Document formal Meson grammar

* Various little fixes [skip ci]

1) Add missing logical_not_expr
2) 'in' and 'not in' are valid relational operators at least for dicts
3) dictionary keys can be expressions, but kwarg names cannot
4) typo logical_end_expression -> logical_and_expression
5) Make jump statements only allowed inside an iteration statement

* Rework EBNF style [skip ci]

As there is no good order for the productions, just go alphabetically.
The EBNF style was changed to match the one the Python lark project
uses, that is colons for productions and terminals enclosed in double
quotes.

* Add missing production for unary operators [skip ci]

* Add production for multiline strings [skip ci]

* Properly define terminal symbols [skip ci]

Depending on the EBNF flavor, regex can be used to describe the terminal
symbols. Lark allows this, and as it was mentioned as a possible user of
this grammar, let's follow its flavor here. Most regexes used are easily
human-readable, and we can always add comments to more complicated ones.

* Small changes to which expressions can be used where [skip ci]

Let the grammar be very general. The type system then has to check, that
the used expression really evaluates to the correct type. Even if we
know today that assignment expressions always evaluate to None (and can
therefore only be used as a toplevel expression in an expression
statement), this needn't be the case forever. So this way, the grammar
stays stable even if such changes were made.

* Rework function argument list production [skip ci]

* Be more verbose for production names [skip ci]

Rename expr -> expression, stmt -> statement, op -> operator, program ->
build_definition. Also adjust some list productions.

* Add paragraph about syntax stability promises [skip ci]
2020-05-01 22:02:17 +03:00
James Hilliard d7c24ccddd Allow get_variable to still function when the fallback is a disabler. 2020-04-30 13:06:56 -07:00
Dylan Baker 1bfeaadd6d Docs: Update link_language docs to explain when it should be used 2020-04-30 11:52:45 -07:00
Dylan Baker fdd6022530 interpreter: Add link_language to all build targets
If the feature hadn't been broken in the first place it would have
worked on them anyway, so we might as well expose it. I'm loathe to do
it because one of the best features of meson in a mixed C/C++ code base
is that meson figures out the right linker every time, but there are
cases people have where they want to force a linker. We'll let them keep
the pieces.
2020-04-30 10:38:55 -07:00
Dylan Baker d8a3c777a6 build: Fix link_language selection
Currently it does nothing, as the field is read too late, and additional
languages have already been considered. As such if the language
requested is closer to C (for example you want C but have a C++ source
with only extern C functions) then link_langauge is ignored.

Fixes #6453
2020-04-30 10:38:55 -07:00
Dylan Baker 650023f0cc unittests: Add test to show that link_language is broken 2020-04-30 10:38:55 -07:00
Dylan Baker 90883fa35d tests: Add common test for link_language
It's cool we have a fortran test, but we should have a C/C++ test,
especially for C++ extern "C".
2020-04-30 10:38:55 -07:00
Dylan Baker 7d4af2ab7c build: add missing type annotation 2020-04-30 10:38:55 -07:00
Dylan Baker 81f35f1549 docs: Update documentation for add_*_script 2020-04-30 10:01:14 -07:00
Dylan Baker c239ce31f5 allow postconf and dist scripts to use Files, ExternalPrograms, and
ConfigureFiles

These things are all known to be ready when these scripts are run, and
thus they can safely consume them.
2020-04-30 10:01:14 -07:00
Dylan Baker 2c0eaf5c4f interpreter: Allow install_script to use additional input types
This adds support for Files, CustomTarget, Indexs of CustomTargets,
ConfigureFiles, ExternalPrograms, and Executables.

Fixes: #1234
Fixes: #3552
Fixes: #6175
2020-04-30 10:01:14 -07:00
Jon Turney cd566d2bd5 CI: pin pylint
Pin pylint version to workaround https://github.com/PyCQA/pylint/issues/3524
2020-04-30 09:59:06 -07:00
Xavier Claessens 4929547b53 gnome: Print proper error when 'nsversion' or 'namespace' are missing 2020-04-30 09:40:35 -04:00
Xavier Claessens 9ddbcd301a ExternalProgram: Do special windows tricks even when name is provided
Closes: #7051
2020-04-30 09:40:35 -04:00
Laurent Pinchart c5d2299cac Fix symlink deletion with --wipe option
When wiping a build tree with --wipe, every entry in the build directory
is removed with mesonlib.windows_proof_rmtree() for directories and
mesonlib.windows_proof_rm() for other files. Symlinks to directories are
considered directories, resulting in the former being called. This
causes an exception to be raised, as the implementation calls
shutil.rmtree(), which isn't allowed on symlinks.

Fix this by using mesonlib.windows_proof_rm() for symlinks.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-04-29 18:55:17 +03:00
Jussi Pakkanen 6e794c380b
Merge pull request #6911 from mensinda/ciBionic
ci: Add Ubuntu Bionic image
2020-04-29 18:23:23 +03:00
Brendan Simon 1cf7f40e85
Meson Cmake Wrapper unmaintained [skip ci]
The Meson CMake Wrapper project is currently unmaintained.
2020-04-28 21:29:03 -07:00
Benjamin Frye ad426547e8
Clarified error message for test(). (#7040)
Changes the error message for test() so it now reports the expected and actual number of parameters.

Fixes: #7029
2020-04-28 21:28:20 -07:00
Xavier Claessens 707d3a2e20 gnome: Fix usage of gobject-introspection as subproject 2020-04-28 14:39:59 -04:00
georgev93 30b89ea573 Adding a conditional case in _guess_files to confirm that the complete path is put together in even if a portion of the path is a location that exists.
For instance if C:/Program Files (x86)/folder is passed to _guess_files, it would resolve to ['C:/Program Files', '(x86)/folder'] since C:/Program Files is an actual file location that can exist.
2020-04-28 19:54:34 +02:00
Daniel Mensinger eefc7d450c
ci: Upgrade to checkout@v2 2020-04-28 18:47:00 +02:00
Daniel Mensinger ade5962e0a
ci: Fix OpenSUSE immage boost_python 2020-04-28 17:54:46 +02:00
Daniel Mensinger 2a586f00b7
tests: Skip hotdoc test if hotdoc is not installed 2020-04-28 17:54:02 +02:00
Daniel Mensinger afffb9e57d
ci: Added bionic image 2020-04-28 17:54:02 +02:00
Daniel Mensinger 4a1f197743
tests: Add support for specifying tool requirements
Adds the `tools` section to `tests.json` to specify requirements
for the tools in the environment. All tests that fail at least
one tool requirements check are skipped.
2020-04-28 17:54:02 +02:00
Daniel Mensinger 20bacf82ee
tests: Avoid a CMake error by checking the CMake version 2020-04-28 17:54:02 +02:00
Daniel Mensinger 4640f13faa
docs: Fix Contributing.md 2020-04-28 17:54:02 +02:00
Eli Schwartz 76c36a64c3
dependency: log cached or skipped dependencies with reference to modules
* dependency: log cached or skipped dependencies with reference to modules

If the dependency is a special dependency which takes modules, the
modules get cached separately and probably reference different
pkg-config files. It's very plausible that we have multiple
dependencies, using different modules. For example:

  Run-time dependency qt5 (modules: Core) found: YES 5.14.2 (pkg-config)
  Dependency qt5 skipped: feature gui disabled

Obviously this makes no sense, because of course we found qt5 and even
used it. The second line is a lot more readable if it shows this:

  Dependency qt5 (modules: Widgets) skipped: feature gui disabled

Similar confusion abounds in the case where a module is found in the
cache -- which module, exactly, has been found here:

  Dependency qt5 found: YES 5.14.2 (cached)

Rewrite the dependency function to *consistently* pass around (and use!)
the display_name even in cases where we know it isn't anonymous (this is
just more correct anyway), and make it serve a dual purpose by also
appending the list of modules just like we do for pretty-printing that a
dependency has just been found for the first time.

* fixup! dependency: log cached or skipped dependencies with reference to modules

pointlessly cast modules to str, as they cannot be anything else. But we
want to fail later on, with something more friendly than a stacktrace.
boost/wx have special exceptions for people passing an integer there.
2020-04-28 02:06:39 +03:00
Xavier Claessens 39a69d1fb0 find_program: Fixes when the program has been overridden by executable
- ExternalProgramHolder has path() method while CustomTargetHolder and
  BuildTargetHolder have full_path().
- The returned ExternalProgramHolder's path() method was broken, because
  build.Executable object has no get_path() method, it needs the
  backend.
- find_program('overridden_prog', version : '>=1.0') was broken because
  it needs to execute the exe that is not yet built. Now assume the
  program has the (sub)project version.
- If the version check fails, interpreter uses
  ExternalProgramHolder.get_name() for the error message but
  build.Executable does not implement get_name() method.
2020-04-28 01:39:56 +03:00
Jussi Pakkanen 34e7e8780c
Merge pull request #7018 from dcbaker/junit
mtest: Generate JUnit results for tests
2020-04-28 01:36:44 +03:00
Peter Harris 7c68fe8008 backend/vs: Fix build when not all languages have pch
It is not unheard-of for a project to use pch for C++ but not for C
(because C usually builds fast enough anyway, so it's not worth the
developer overhead of maintaining the pch file).

This code was trying to optimize the vcxproj file size by detecting
"only one language", but it was only looking at the number of
pch-languages defined. This is incorrect when pch is not defined for all
languages in use.

Instead of tweaking the optimization further, remove it. This makes the
vs backend behave more like the ninja backend.
2020-04-24 22:19:16 +03:00
georgev93 8e397491b4 Adjust regex to handle cases such as C:/Program Files/folder 2020-04-24 10:47:52 +02:00
Dylan Baker 97f7e3d83c ci: Try to fix opensuse image 2020-04-23 13:26:01 -07:00
Dylan Baker 7b7f93a09f mtest: Generate a JUnit xml result file
JUnit is pretty ubiquitous, lots of services and results viewers
understand it, in particular gitlab and jenkins know how to consume
JUnit xml. This means projects using CI services can have their test
results consumed automatically.

Fixes: #6972
2020-04-23 13:26:01 -07:00
Dylan Baker 0c3bb15357 mtest: Store individual results for TAP tests
This will be used by the Junit writer
2020-04-23 13:26:01 -07:00
Andrew Udvare 39ca178d21 compilers: fix type issue
mesonlib.darwin_get_object_archs() only accepts a string argument so convert
it.
2020-04-23 10:00:27 -07:00
Michael 61e53fbfd9 update MANIFEST.in 2020-04-23 00:16:45 +03:00
Dylan Baker 4dcbb9254a mtest: Use textrwap.dedent for large block
This allows editors like vim to properly fold the code, and makes it
generally easier to read.
2020-04-22 13:55:19 -07:00
Dylan Baker 959c1becd6 ci: install python3-lxml
This will be used by the junit validation tests.
2020-04-22 13:55:19 -07:00
Alexandre Lavigne bfea80677e Issue: 7009: CMake/Centos7 Unable to find CMake even though it is installed
On some systems the binary 'cmake' for version 3 is named 'cmake3',
therefor printing its version number prints:
'cmake3 version X.Y.Z' instead of 'cmake version X.Y.Z'
This '3' digit in the middle breaks the regular expression
extracting the version number.

The following fix permit both way to work and the regexp to
match the proper version number.

Signed-off-by: Alexandre Lavigne <alexandre.lavigne@scality.com>
2020-04-22 00:10:25 +03:00
Dylan Baker 57b468c75a Use pkg_resource to find resources files (data)
Doing this by hand is fraught with corner cases, and we're running into
some of those problems already. setuptools pkg_resource is a well tested
solution for not running into corner cases, and we already rely on
setuptools to make our entry point scripts work, so we might as well
make us of the other things it can solve for us.

Fixes #6801
2020-04-21 00:40:19 +03:00