Commit Graph

2646 Commits

Author SHA1 Message Date
Dylan Baker 336f2f8835 tests: Add a test for dependencies with native set in a host == build configuration 2021-05-28 09:26:38 -04:00
Dylan Baker f1e053fa44 modules/gnome: Correctly handle generated sources for generate_gir
We need to pass any generated sources down the CustomTarget
inititalizers so that they will generate a dependency correctly,
otherwise we get race conditions.
2021-05-28 08:47:11 -04:00
Chun-wei Fan 45af5d9d72 test cases: Disable whole archive test on older VS IDE
The pre-2015 Visual Studio IDE do not handle things correctly for this test,
so disable this.
2021-05-27 09:54:37 -07:00
Chun-wei Fan 0a0639ec06 MSVC: Always enable common tests 137 and 170
This will test the "whole archive" and "generator link whole" for all
Visual C++ versions.
2021-05-27 09:54:37 -07:00
Jussi Pakkanen cb085f3eb3 Handle macOS filesystem sometimes setting lower digits to zero. 2021-05-23 17:58:56 +01:00
Jussi Pakkanen 3d12f928cf Rename VERSION because case insensitive file systems are a thing. 2021-05-23 17:58:56 +01:00
Jon Turney f76c6b8d0a
Fix LTO test on Cygwin
This partially reverts commit add502c648.

In 'linkshared' test, annotate cppfunc() as imported, so an indirection
through an import stub is generated, avoiding a relocation size error
when building using gcc for Cygwin with LTO on.

Align with the example of how to write this portably in [1].

The 'c' language part of that test already gets this right.

[1] http://gcc.gnu.org/wiki/Visibility
2021-05-21 14:19:35 +01:00
Jon Turney 2d215d93b2
Revert "Disable failing Cygwin GIR test."
This partially reverts commit add502c648.
2021-05-20 23:12:21 +01:00
Jon Turney 1694e4ceca
Revert "Disable broken asm test on Cygwin as nobody knows how to fix it."
This reverts commit 56a0e74d71.
2021-05-20 21:49:40 +01:00
Dylan Baker 619e05c8cf vala: Test that adding C manually isn't requiured 2021-05-20 13:27:17 -07:00
Dylan Baker 17eb224aa7 interpreter: Automatically add 'c' to languages when 'vala' is used
This is so dumb, we can just insert C for you without you having to know
that you're using C under the hood. This is nicer because:
1) Meson doesn't make the user add a language they're not explicitly
   using
2) If there was ever an implementaiton of Vala that didn't use C as
   it's assembly language, this wouldn't make any sense.
2021-05-19 23:28:17 +03:00
Volker-Weissmann 4ca9a16288
.C files are now treated as C++ code 2021-05-19 17:10:22 +03:00
Xavier Claessens 69a5c950a3 pkgconfig: Do not escape custom variables
We need to escape space in variables that gets into cflags or libs
because otherwise we cannot split compiler args when paths contains
spaces. But custom variables are unlikely to be path that gets used in
cflags/libs, and escaping them cause regression in GStreamer that use
space as separator in a list variable.
2021-05-18 18:03:37 -04:00
Dylan Baker e7e04c814b Add a rust test for internal c linkage
We have code to support this, but no tests. That seems pretty bad.
And better yet, it doesn't work on MSVC in some cases.
2021-05-18 09:34:36 -07:00
Michael Hirsch 1730778974 test:fortran:21: fix Windows by using configure_file(copy:) 2021-05-13 15:24:06 +03:00
Xavier Claessens 501d7cf01c interpreter: flatten environment() initial values
Turns out listify() flattens by default, but stringlistify() cannot
flatten... How do I realize this only now?

Fixes: #8727
2021-05-13 10:38:17 +03:00
Xavier Claessens 4e312c19e6 gnome: Fix gtkdoc generation
install_scripts used to replace @BUILD_ROOT@ and @SOURCE_ROOT@ but it
was not documented and got removed in Meson 0.58.0. gnome.gtkdoc() was
relying on that behaviour, but it has always been broken in the case the
source or build directory contains spaces.

Fix this by changing get_include_args() to substitue paths directly
which will then get escaped correctly.

Add a unit test that builds GObject documentation which is where this
issue has been spotted.

Fixes: #8744
2021-05-12 15:54:37 -04:00
Jussi Pakkanen c54dd63547 Make objective C use C standard version. Closes #5495. 2021-05-11 22:47:17 +03:00
Florian Fischer 247630b981 modules/fs: support FileOrString arguments
With this change File objects created with the builtin files() function
can be used with the fs submodule like normal strings.

All methods that seem reasonable support FileOrSting arguments.
For example fs.exists() still only takes str arguments because meson
already ensures that File objects do exist when creating them with files().

Each user facing function of the fs module has an additional FeatureNew
check when used with File objects.

The test cases for fs are extended appropriately with tests for File objects.
2021-05-08 21:34:00 +03:00
Marco Trevisan (Treviño) d5932a174d test cases: Add test ensuring that -include in gcc won't break pch
This is just forcing the usage of -include as c_args, even though this
particular case can happen easily when this is provided via a dependency
cflags.

We also ensure that both the headers are included by using locale
definitions.
2021-05-08 21:27:35 +03:00
Jussi Pakkanen e75e3976fa Condense test directory names. 2021-04-26 23:39:15 +01:00
Jason Francis 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
Dylan Baker 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
Xavier Claessens 3af39a463b Interpreter: Fallback when required is false but forcefallback is true 2021-04-26 17:04:57 +01:00
Jussi Pakkanen a10a6284d2 Merge if and else tests to a single project. 2021-04-26 02:08:51 +03:00
Jussi Pakkanen 1a31882f59 Xcode: make Swift projects work. 2021-04-25 15:35:13 +03:00
Jussi Pakkanen 8f2155f4f7 Xcode: some more skips. 2021-04-24 19:41:27 +03:00
Jussi Pakkanen aa2a153afb Xcode: fix linking to customtargetindex objects. 2021-04-24 19:41:27 +03:00
Jussi Pakkanen 3e3e81ccf0 Xcode: one more skip. 2021-04-23 23:03:26 +03:00
Jussi Pakkanen 10197aa9d1 Xcode: a few more skips. 2021-04-23 23:03:26 +03:00
Jussi Pakkanen a2fd31f6c6 Xcode: skip one more object extraction test. 2021-04-23 17:29:29 +03:00
Jussi Pakkanen b9b00c714e Xcode: use native path naming scheme. 2021-04-22 16:53:43 +03:00
Jussi Pakkanen 4881c2cf98 Xcode: skip link language override test. 2021-04-22 16:53:43 +03:00
Jussi Pakkanen 59e8962c25 Xcode: one more whole-archive skip. 2021-04-21 17:16:01 +03:00
Jussi Pakkanen d116d94f92 Xcode: fix file objects in various places. 2021-04-20 17:23:50 +03:00
Jussi Pakkanen 07117c4225 Xcode: skip all-object library test. 2021-04-20 17:23:50 +03:00
Jussi Pakkanen 045893bb18 Xcode: disable asm and LLVM ir projects. 2021-04-19 17:59:40 +03:00
Xavier Claessens 3c64ecaf86 pkgconfig: Add support for CustomTarget objects in generator
Fixes: #8618.
2021-04-19 17:57:34 +03:00
Jussi Pakkanen 4fc578a25f Xcode: skip object extraction test that can not be made to work. 2021-04-18 19:19:29 +03:00
Jussi Pakkanen 96d85d601d Xcode: fix path of extracted objects in subdirs. 2021-04-14 17:25:41 +03:00
Tristan Partin 4c13aa30a1 dependency: Add JDK system dependency
The JDK system dependency is important for detecting JDK include paths
that may be useful when developing a JNI interface.
2021-04-12 10:43:11 -07:00
Xavier Claessens 5440ce003b Add global_source/build_root() 2021-04-09 09:29:12 -07:00
Jussi Pakkanen 59306c45c5 Fix Xcode targets in subdirs. 2021-04-08 10:22:57 +03:00
Jussi Pakkanen e80ff985fb Do not add custom target dir automatically when implicit false. 2021-03-29 18:57:34 +03:00
Olexa Bilaniuk 2579420a72 Strip host-compiler -std flag from NVCC line.
Closes #8523.
2021-03-28 20:12:45 +03:00
Xavier Claessens 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
Jussi Pakkanen 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
Jussi Pakkanen 9b27d110d1
Merge pull request #8571 from xclaesse/spurious-warning
Fix spurious sandbox violation warning
2021-03-24 17:53:10 +02:00
D Scott Phillips 703fd6d1fa
compilers: clang-cl: Also accept .s files (#8520)
* compilers: clang-cl: Also accept .s files

clang-cl has support for gas-compatible assembly files.

* Add clang-cl to '128 generated assembly' test
2021-03-24 12:43:51 +02:00
Dylan Baker 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