If a dep is not found on the system and a fallback is specified, we
have two cases:
1. Look for the dependency in a pre-initialized subproject
2. Initialize the subproject and look for the dependency
Both these require version comparing, ensuring the fetched variable
is a dependency, and printing a success message, erroring out, etc.
Now we share the relevant code instead of duplicating it. It already
diverged, so this is a good thing.
As a side-effect, we now log fallback dependencies in the same format
as system dependencies:
Dependency libva found: YES
Dependency libva found: YES (cached)
Dependency glib-2.0 from subproject subprojects/glib found: YES
Dependency glib-2.0 from subproject subprojects/glib found: YES (cached)
Otherwise we will try to use the objc compiler when linking projects
with both objc and C++.
Technically we should use the objc++ linker when doing this, but on
most (all?) systems the objc++ linker is `c++`, which is the same
as the C++ linker.
Closes https://github.com/mesonbuild/meson/issues/2468
The Visual Studio Developer Command Prompt always sets the VSINSTALLDIR
environment variable. If not, we probably have a broken environment and
won't get very far anyway.
The gtkdoc function can also use generated targets to create
documentation. However, the dependencies over these generated files
are missing, so these must be also included in the run target.
Special case ThreadDependency by taking compiler's flags and
PkgConfigDependency by adding them in requires(.private) instead. For
other Dependency objects just take their link_args and compile_args.
Closes#2725
Duplicated options in array types have been removed by a previous
commit but someone could be using it.
The previous behaviour has been restored but the existence of
duplicates is now tested, and in that case a `DEPRECATION` message
is shown.
I have a tendency to typo things. Humans in general are bad at spotting
spelling mistakes, computers are not. This patches prints the bad
options and provides the generic meson "This will be a hard error
someday" message.
gnome's gtkdoc function does not support content files which are
not strings. However, there are situations where files generated
by other targets might be needed.
Array options can receive duplicated values, which can produce
errors if case those duplicated values make processing some
elements twice when they are expected to be processed only once.
See issue #2762
Adds full_version to class Compiler. If set full_version will be printed
additionally.
Added support for CCompiler and CPPCompiler
Added support for gcc/g++, clang/clang++, icc.
If LLVM is built from a git mirror instead of from SVN it will have
"git-<very short sha>" at the end of the version. We need to remove that
so that version comparison will work correctly.
Fixes: #2786