Commit Graph

1035 Commits

Author SHA1 Message Date
1d06d4ca1a Set unittest backend with an argument rather than an envvar. 2021-05-08 21:35:08 +03:00
802f66f442 Clarify incorrect configuration format message
Print the path and line where the problem occurred to make it more clear
what the error message means.
2021-05-03 13:06:05 -07:00
b2687e86c8 Do not accidentally format files when only checking if they are formatted. 2021-05-01 23:34:14 +03:00
e75e3976fa Condense test directory names. 2021-04-26 23:39:15 +01:00
cc54284885 Fix issue where multiple dist files were not being produced for comma separated formats value 2021-04-26 17:13:13 +01:00
39c751b94c introspection: export all sources for custom targets
Also adds some test cases for source files in target_sources.
2021-04-26 17:08:26 +01:00
bb12587e0b Add subprojects purge wrap-git coverage 2021-04-26 12:06:12 -04:00
d4e867809b store the list of initializes subprojects in the coredata structure
We need to konw on rconfigure which options have already bee set not
just for the super project, but also for the subproject. However, using
first_invocation is not sufficient, as a reconfigure could add a new
subpproject that wasn't present before, and we need to initialize that
project's builtins.
2021-04-26 17:05:44 +01:00
3af39a463b Interpreter: Fallback when required is false but forcefallback is true 2021-04-26 17:04:57 +01:00
b6d277c140 Add 'subprojects purge' command
This will help facilitate cache busting in certain situations, and
replaces hand-rolled solutions of writing a length command to remove
various files/folders within the subprojects directory.
2021-04-26 16:42:29 +03:00
3c64ecaf86 pkgconfig: Add support for CustomTarget objects in generator
Fixes: #8618.
2021-04-19 17:57:34 +03:00
d9b9eecd54 msetup: Restore .gitignore after wipe 2021-04-17 22:54:03 -04:00
fdde948ca1 environment: don't load project options from a native file in a cross build 2021-04-06 16:09:13 -07:00
7ec9e81e6f Merge pull request #8606 from dcbaker/submit/fix-for-build-env-variables
Fix _FOR_BUILD env variables
2021-04-03 20:42:21 +03:00
558a7bc6ff interpreter: Move to its own folder and split it 2021-04-01 14:26:33 -04:00
d569d0bb3c tests: Add a test for the _FOR_BUILD env vars 2021-04-01 09:54:43 -07:00
848cacc38c unittests: extend machine file override tests for CFLAGS (and friends)
They behave slightly differently than other env vars, so have a test for
them as well.
2021-04-01 09:22:11 -07:00
2cd0723c42 Split environment variable and command line cflags
They are supposed to have different behavior. The environment variables
apply to both the compiler and linker when the compiler acts as a
linker, but the command line ones do not.

Fixes #8345
2021-03-30 18:52:17 +03:00
e80ff985fb Do not add custom target dir automatically when implicit false. 2021-03-29 18:57:34 +03:00
47633330da pkgconfig: Allow setting prefix in dataonly pc file
Some variables are reserved because meson set them automatically. But we
are not setting them for dataonly pc files, so there is no reason to
reserve them.

Fixes: #8583.
2021-03-26 23:41:03 +02:00
54767ab482 Merge pull request #8568 from dcbaker/submit/qt-dependency-factory
QT: use a proper dependency factory
2021-03-24 22:52:15 +02:00
c211fea513 Refactor Qt Dependency into proper split classes with factories
Currently the Qt Dependencies still use the old "combined" method for
dependencies with multiple ways to be found. This is problematic as it
means that `get_variable()` and friends don't work, as the dependency
can't implement any of those methods. The correct solution is to make
use of multiple Dependency instances, and a factory to tie them
together. This does that.

To handle QMake, I've leveraged the existing config-tool mechanism,
which allows us to save a good deal of code, and use well tested code
instead of rolling more of our own code.

The one thing this doesn't do, but we probably should, is expose the
macOS ExtraFrameworks directly, instead of forcing them to be found
through QMake. That is a problem for another series, and someone who
cares more about macOS than I do.
2021-03-23 15:28:08 -07:00
1be13710ad environment(): Allow stacking append() and prepend() (#8547)
* environment(): Allow stacking append() and prepend()

* Update docs/markdown/Reference-manual.md

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
2021-03-23 17:48:17 +02:00
b33e7bca73 mlog: Add a space after 'subproject|' 2021-03-22 21:29:14 -04:00
40e3577a65 split program related classes and functions out of dependencies
Dependencies is already a large and complicated package without adding
programs to the list. This also allows us to untangle a bit of spaghetti
that we have.
2021-03-19 08:47:10 -04:00
f7b0238ed6 add test case for installed targets uninstalling a single directory 2021-03-18 21:50:38 -04:00
3990754bf5 Allow add_dist_script() in subprojects
Fixes: #8440.
2021-03-18 08:41:21 -04:00
0638e38bfc clangformat: Add clang-format-check target 2021-03-16 21:01:54 -04:00
f558689277 clangformat: Add include and ignore files 2021-03-16 21:01:54 -04:00
ecd8c7e4af Update VS module version check. 2021-03-16 21:06:51 +02:00
3ac3e125e4 Delete leftover files from some tests. 2021-03-16 16:37:02 +02:00
5cd7f5f8c5 msetup: do not print bogus "Option ... is:" messages
get_non_matching_default_options is checking a string from
project_default_options against a validated value from
coredata.options.

Passing the string to validate_value ensures that the comparison
is sound; otherwise, "false" might be compared against False
and a bogus difference is printed.
2021-03-16 09:35:48 -04:00
598e968993 Add meson devenv command and meson.add_devenv() 2021-03-16 09:00:50 -04:00
be86199221 Fix run_targets running scripts from different subdirs. 2021-03-14 13:17:19 +02:00
8801381563 Fix duplicate pkg_config_path entries
Previously builds would *potentially* get sammed with messaging at
configure time that duplicate entries in an array would be an error in
the future, and the cause was because the same entries were getting
added over and over to pkg_config_path.p
2021-03-12 12:32:41 -05:00
6a0fabc647 mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04 17:16:11 -05:00
4340bf34fa various python neatness cleanups
All changes were created by running

"pyupgrade --py3-only --keep-percent-format"

and committing the results. I have not touched string formatting for
now.

- use set literals
- simplify .format() parameter naming
- remove __future__
- remove default "r" mode for open()
- use OSError rather than compatibility aliases
- remove stray parentheses in function(generator) scopes
2021-03-04 17:11:26 -05:00
76df995ba6 raw string literals are next to godliness
Invalid escape sequences are deprecated and will be removed from a
future version of python. Use r"" to define them so they remain
readable.
2021-03-04 17:09:00 -05:00
be0a05e777 mintro: include the correct target filenames for flat layout
Fixes: #8408
2021-03-04 17:36:41 +01:00
0c663d056a mtest: create separate runners for multiple repeats
Reusing the runners for multiple repeats of the test run gets in the
way of the progress report, which stores runners in an OrderedSet.
Instead, create a separate SingleTestRunner object for each repeat.

While at it, fix the "duplicate suite" assertion as it can fire
with TAP tests and --repeat=N.

Fixes: #8405
2021-03-02 00:57:57 +02:00
e079553959 interpreter: correctly track whether a subproject is initialized
The way the tracking is currently done it works if no new subprojects
are added to a configured build directory. For cases where we want to
add a new subproject, it fails because we don't initialize builtins for
that subproject. This corrects that by checking to see if the subproject
already exists, and if it doesn't initializes the bultins for it.

Fixes: #8421
2021-02-26 09:05:30 -08:00
ec5fe58e6d Allow printing UserOptions in the summary 2021-02-26 10:28:00 -05:00
cef5cab23c Support multiple args in error()
Seems it got forgotten when that was added to warnings() and message().

Fixes: #8414.
2021-02-25 22:58:45 +02:00
2fabd4c7dc minstall: Add --skip-subprojects option
By default all subprojects are installed. If --skip-subprojects is given
with no value only the main project is installed. If --skip-subprojects
is given with a value, it should be a coma separated list of subprojects
to skip and all others will be installed.

Fixes: #2550.
2021-02-22 23:03:55 +02:00
b03039ec9d allow build.b_* options
These continue to be ignored as they always have, but no longer raise an
error.

Fixes: #8354
2021-02-18 10:57:20 -08:00
add502c648 Disable failing Cygwin GIR test. 2021-02-18 02:14:07 +02:00
a5b33db558 ci: Fix failure in unit tests with vs backend 2021-02-17 22:59:54 +02:00
92134bac8d unittests: expect mtest logs to be utf-8 2021-02-17 21:14:05 +02:00
6c1467db27 compilers: Only insert -flto-jobs in clang's link arguments
Clang has a hand `-Wunused-command-line-argument` switch, which when
turned to an error, gets very grump about `-flto-jobs=0` being set in
the compiler arguments (although `-flto=` belongs there). We'll refactor
a bit to put that only in the link arguments.

GCC doesn't have this probably because, a) it doesn't have an equivalent
warning, and b) it uses `-flto=<$numthreads.

Fixes: #8347
2021-02-17 18:06:52 +02:00
b6804bf49c Substitute @CURRENT_SOURCE_DIR@ in run_target() and custom_target()
run_target() does some variable substitutions since 0.57.0. This is a
new behavior, and undocumented, caused by sharing more code with
custom_target(). More consistency is better, so document it now.

custom_target() was doing variable substitution in the past, because it
shared some code with generator(), but that was undocumented. Some
refactoring in 0.57.0 caused it to not replace @CURRENT_SOURCE_DIR@,
@SOURCE_DIR@, and @BUILD_DIR@ anymore. This patch adds back
@CURRENT_SOURCE_DIR@ and document it. It does not add back @SOURCE_DIR@
because it is duplicate with @SOURCE_ROOT@ that has a better name. Also
do not add back @BUILD_DIR@ which is duplicate of @PRIVATE_DIR@, and
not @BUILD_ROOT@ surprisingly, adding to the confusion.
2021-02-17 14:48:04 +02:00