Commit Graph

146 Commits

Author SHA1 Message Date
Michael Hirsch, Ph.D f990c3eee4 typo 2019-06-24 14:07:32 -04:00
Michael Hirsch, Ph.D cf7935be61 update compiler ID for windows INtel MPI 2019-06-24 14:06:32 -04:00
Michael Hirsch, Ph.D 9a3bc75410 intel windows coarray args 2019-06-24 14:06:32 -04:00
Jussi Pakkanen 9e09c85e6c Handle thread flags when not using C at all. Closes #5497. 2019-06-19 00:04:57 +03:00
Andrei Alexeyev 4b73f50222 dependencies/shaderc: fix exception caused by typo 2019-06-13 21:30:06 +03:00
John Ericson 07777e15d4 Purge `is_cross` and friends without changing user interfaces
In most cases instead pass `for_machine`, the name of the relevant
machines (what compilers target, what targets run on, etc). This allows
us to use the cross code path in the native case, deduplicating the
code.

As one can see, environment got bigger as more information is kept
structured there, while ninjabackend got a smaller. Overall a few amount
of lines were added, but the hope is what's added is a lot simpler than
what's removed.
2019-06-09 13:13:25 -04:00
Daniel Mensinger 8a32fc8dbe
Disable cache for dependencies 2019-04-28 14:33:22 +02:00
Daniel Mensinger 971dfd664b
Added some cahced values 2019-04-28 14:33:21 +02:00
Daniel Mensinger dfe3d56bfd
Print '(cached)' when compiler result was cached 2019-04-28 14:33:21 +02:00
Dylan Baker b510bc12ac Shaderc pkg config 2019-04-15 21:43:03 +03:00
Eli Schwartz f5bc0ab44a fix gpgme support by preferring pkg-config where possible
Since gpgme 1.13.0, pkg-config files are available and this is the
preferred way to detect the dependency. Without this, projects that wish
to generate pkg-config files that Requires.private on gpgme, now have
their custom dependency() fallbacks overridden with an incorrect
configtool dependency.
2019-04-15 11:09:49 -07:00
Jussi Pakkanen 54db2c9bab
Merge pull request #5225 from dcbaker/threads-is-not-special
Threads is not special
2019-04-08 21:06:55 +03:00
Jan Tojnar e8a688428d Add gpgme-config support
GPGME does not support pkg-config so we need config-tool support if
we do not want projects like Almanah and Seahorse to parse the values
manually.
2019-04-06 22:35:10 +03:00
Dylan Baker 6ad7fbf950 dependencies/misc: don't special case threads
Instad of having special casing of threads in the backends and
everywehre else, do what we did for openmp, create a real
dependency. Then make use of the fact that dependencies can now have
sub dependencies to add threads.
2019-04-05 16:41:08 -07:00
Michael Hirsch, Ph.D 42a04f7e23 BUGFIX: Microsoft MPI is only compatible with Intel Fortran 2019-04-05 23:48:20 +03:00
Andrei Alexeyev 8209180c76 Add shaderc dependency lookup logic 2019-04-02 22:47:10 +03:00
Dylan Baker 1f342a2081 dependencies/openmp: Don't special case OpenMP
Currently we specialcase OpenMP like we do threads, with a special
`need_openmp` method. This seems like a great idea, but doesn't work
out in practice, as well as it complicates the opemp
implementation. If GCC is built without opemp support for example, we
still add -fopenmp to the the command line, which results in
compilation errors.

This patch discards that and treats it like a normal dependency,
removes the need_openmp() method, and sets the compile_args attributes
from the compiler.

Fixes #5115
2019-03-19 12:48:22 -07:00
Dylan Baker 2a6b8e209f dependencies/openmp: Pass openmp arguments to look for _OPENMP define
On GCC anc Clang th _OPENMP preprocessor define is only defined if
-fopenmp is passed to the compiler.
2019-03-19 12:48:22 -07:00
Nacho García 222a973918 dependencies: fix Python linking for windows+mingw
For dynamic linking, some mingw releases don't link
correctly with pythonXX.lib in all cases.
This patch forces mingw to link against
pyhthonXX.dll instead of the .lib file, which has
a better compatiblity.

Note that msys 1.0 old platform is detected
as windows instead of 'mingw'
2019-03-18 09:51:31 +00:00
Michael Hirsch, Ph.D 71cffa67fa add NetCDF 2019-02-28 22:13:38 +02:00
Michael Hirsch, Ph.D ebfb09f5d6 Fortran 2008/2018 Coarray support 2019-02-13 21:09:18 +02:00
Michael Hirsch, Ph.D 6b874339cc BUGFIX: Fortran openmp 2019-02-13 21:06:15 +02:00
Michael Hirsch, Ph.D 8821c0aadc better handle variable HDF5 setups, update Fortran compiler def 2019-02-01 07:26:32 +00:00
Jussi Pakkanen abad2ff005
Merge pull request #4831 from scivision/hdf5 2019-01-31 22:42:57 +02:00
Nirbheek Chauhan c0166355ce Rewrite appleframework and extraframework dependency classes
Instead of only doing a naive filesystem search, also run the linker
so that it can tell us whether the -F path specified actually contains
the framework we're looking for.

Unfortunately, `extraframework` searching is still not 100% correct in
the case when since we want to search in either /Library/Frameworks or
in /System/Library/Frameworks but not in both. The -Z flag disables
searching in those prefixes and would in theory allow this, but then
you cannot force the linker to look in those by manually adding -F
args, so that doesn't work.
2019-02-01 00:14:09 +05:30
Michael Hirsch, Ph.D 4d54a22b49
setup hdf5 test
deblank
2019-01-30 23:49:11 -05:00
Michael Hirsch, Ph.D 1ebaeadf60
initial HDF5 pkg-config fortran works 2019-01-30 06:38:29 -05:00
Michael Hirsch, Ph.D da34bea893 pep8 py37 2019-01-29 22:06:11 +02:00
Daniel Mensinger a0175ecb14 CMake find_package dependency backend (#4444) 2018-11-22 22:30:12 +02:00
Dylan Baker 0427ba48e6 dependencies/misc: Add openmp 5.0 preliminary support
ICC 19 has openmp support, but it's 5.0 preliminary (rev 1, while rev
7 is current). It passes our tests though, so lets add it.

Fixes: #4491
2018-11-15 18:34:12 -08:00
Dylan Baker 34c1edda87 dependencies: Add openmp 5.0
Since it's been released and we know what the version it will return is.
2018-11-10 20:26:45 +02:00
Jon Turney 26ff712bae Fail some impossible cross-detections
Make some detections I can't see how to make work in a cross-environment
fail.
2018-11-02 21:39:02 +02:00
Patrick Griffis 46a42a69a6 Add custom libgcrypt dependency using libgcrypt-config
Fixes #3563
2018-10-03 01:22:59 +03:00
Jon Turney 39d87269b3 Add missing reporting of some methods tried to find the dependency
Make us report 'system' and 'framework' when we tried those methods to
locate the dependency.
2018-09-10 21:02:18 +03:00
Jon Turney c54cd69015 Modernize Python3Dependency
Somehow I overlooked this class when adjusting everything else in c59ec874
et seq.

Update Python3Dependency so it has a _factory() method which returns a list
of constructors, depending on the method: kwarg, which integrates better
with the reporting in find_external_dependency()

This ensures the return of a PkgConfigDependency object, if the dependency
is found with pkgconfig, so we don't have to specifically implement
get_pkgconfig_variable() ourselves.
2018-09-03 21:59:10 -07:00
Jon Turney 6a4c2d63d7
Comparison with an unknown dependency version should always fail
Consistently use None to store an unknown dependency version (rather than
'none', 'unknown' or some made up version)
2018-08-26 17:23:39 +01:00
Jon Turney b8de56ee61
Only use the numeric part of the pcap_lib_version()
Trim 'libpcap version ' and ' -- Apple version'

Future work: Note that method of finding the pcap version can't work when
cross-compiling.
2018-08-26 17:23:39 +01:00
Jon Turney a956698c79
Pass kwargs to ThreadDependency superclass constructor 2018-08-26 17:23:39 +01:00
Jon Turney 15d902cdb0
Drop redundant logging in OpenMPDependency constructor
This should have been removed in f2673d9b
2018-08-26 17:23:39 +01:00
Jon Turney f2673d9b57
Consolidate reporting result of a dependency check
If successful, we should identify the method which was successful
If successful, we should report the version found (if known)
If failing, we should identify the methods we tried

Some dependency detectors which had no reporting now gain it

There's all kinds of complexities, inconsistencies and special cases hidden
in the existing behaviour, e.g.:

- boost reports modules requested, and BOOST_ROOT (if set)
- gtest/gmock report if they are a prebuilt library or header only
- mpi reports the language
- qt reports modules requested, and the config tool used or tried
- configtool reports the config tool used
- llvm reports if missing modules are optional (one per line)

We add some simple hooks to allow the dependency object to expose the
currently reported information into the consolidated reporting

Note that PkgConfigDependency() takes a silent: keyword which is used
internallly to suppress reporting.  This behaviour isn't needed in
find_external_dependency().
2018-08-01 14:26:01 +01:00
Jon Turney 3576623b0f
Consolidate raising a DependencyException() if required but not-found
This is now done by find_external_dependency() in all cases

I can't help but think this perhaps should be in a few more places...
2018-08-01 14:26:00 +01:00
Jon Turney 01118ce2a4
Add a finish_init callback to ConfigToolDependency()
Give ConfigToolDependency() a finish_init callback, so that tool-specific
initialization can be called from the constructor, rather than after
construction in the factory class.

v2:
finalize -> finish_init for clarity
2018-08-01 14:25:59 +01:00
Jon Turney 82bdf07a9d
Hoist trying several dependency detection methods up to find_external_dependency()
find_external_dependency() now makes and iterates over a list of callables
which are constructors with bound arguments for the dependency objects we
are going to attempt to make, so we can consolidate reporting on these
attempts and handling failures in that function.
2018-08-01 14:25:58 +01:00
Jon Turney fce4f35170
Remove do-nothing extraframework method from libwmf and pcap
libwmf and pcap allegedly support method:extraframework, but this does
nothing but return not-found.  Possibly cut-and-pasted from elsewhere?
2018-08-01 14:25:56 +01:00
Nirbheek Chauhan a1d9adba09 FeatureNew: Make all checks subproject-specific
We now pass the current subproject to every FeatureNew and
FeatureDeprecated call. This requires a bunch of rework to:

1. Ensure that we have access to the subproject in the list of
   arguments when used as a decorator (see _get_callee_args).
2. Pass the subproject to .use() when it's called manually.
3. We also can't do feature checks for new features in
   meson_options.txt because that's parsed before we know the
   meson_version from project()
2018-07-02 19:52:53 +05:30
Nirbheek Chauhan 58ae2c9a8c Rename clike_langs to clink_langs for clarity
D is not a 'c-like' language, but it can link to C libraries. The same
might be true of Rust in the future and Go when we add support for it.

This contains no functionality changes.
2018-06-20 11:27:08 +00:00
Nirbheek Chauhan d737488150 dependencies: Don't assume self.compiler is a C compiler
All dependencies were using find_library, has_header, get_define, etc on
self.compiler assuming that it's a compiler that outputs and consumes
C-like libraries. This is not true for D (and in the future, for Rust)
since although they can consume C libraries, they do not use the
C ecosystem.

For such purposes, we now have self.clib_compiler. Nothing uses
self.compiler anymore as a result, and it has been removed.
2018-06-20 11:27:08 +00:00
Nirbheek Chauhan 26e11f5fd8 Add missing FeatureNew for libwmf dependency
Also add it to the release notes for the 0.44 release.

https://github.com/mesonbuild/meson/pull/3709#issuecomment-395738573
2018-06-10 23:26:07 +03:00
Salamandar 2fb6018763 Add 0.46.0 features 2018-06-01 14:23:24 +02:00
Salamandar 4741f1e243 Add 0.42.0 features 2018-06-01 14:23:24 +02:00