diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-03-20 20:37:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-20 20:37:25 +0200 |
commit | 24227a95531b21a04bf2514a5b8f61ae29d47043 (patch) | |
tree | fdf15d1ecd54d086dab47c74e07c0503a431c2ae /test cases | |
parent | 84e216fd64028b175eee93783da6d54dadae09e2 (diff) | |
parent | 4120cdd01ae77e9fb41297600ff137435ef00680 (diff) | |
download | meson-24227a95531b21a04bf2514a5b8f61ae29d47043.zip meson-24227a95531b21a04bf2514a5b8f61ae29d47043.tar.gz meson-24227a95531b21a04bf2514a5b8f61ae29d47043.tar.bz2 |
Merge pull request #6544 from dcbaker/mpi-dependency-factory
Use DependencyFactory and ConfigToolDependency for MPI
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/frameworks/17 mpi/meson.build | 10 | ||||
-rw-r--r-- | test cases/frameworks/17 mpi/meson_options.txt | 6 |
2 files changed, 12 insertions, 4 deletions
diff --git a/test cases/frameworks/17 mpi/meson.build b/test cases/frameworks/17 mpi/meson.build index b6a44cf..75b463c 100644 --- a/test cases/frameworks/17 mpi/meson.build +++ b/test cases/frameworks/17 mpi/meson.build @@ -1,7 +1,9 @@ project('mpi', 'c', 'cpp', default_options: ['b_asneeded=false']) +method = get_option('method') + cc = meson.get_compiler('c') -mpic = dependency('mpi', language : 'c', required : false) +mpic = dependency('mpi', language : 'c', required : false, method : method) if not mpic.found() error('MESON_SKIP_TEST: MPI not found, skipping.') endif @@ -14,7 +16,7 @@ test('MPI C', exec, timeout: 10) # C++ MPI not supported by MS-MPI cpp = meson.get_compiler('cpp') -mpicpp = dependency('mpi', language : 'cpp', required: false) +mpicpp = dependency('mpi', language : 'cpp', required: false, method : method) if not cpp.links(''' #include <mpi.h> #include <stdio.h> @@ -31,7 +33,7 @@ test('MPI C++', execpp, timeout: 10) if add_languages('fortran', required : false) fc = meson.get_compiler('fortran') - mpif = dependency('mpi', language : 'fortran', required: false) + mpif = dependency('mpi', language : 'fortran', required: false, method : method) if not fc.links('use mpi; end', dependencies: mpif, name: 'Fortran MPI') mpif = disabler() endif @@ -46,5 +48,5 @@ endif # Check we can apply a version constraint if mpic.version() != 'unknown' - dependency('mpi', version: '>=@0@'.format(mpic.version())) + dependency('mpi', version: '>=@0@'.format(mpic.version()), method : method) endif diff --git a/test cases/frameworks/17 mpi/meson_options.txt b/test cases/frameworks/17 mpi/meson_options.txt new file mode 100644 index 0000000..7e9363e --- /dev/null +++ b/test cases/frameworks/17 mpi/meson_options.txt @@ -0,0 +1,6 @@ +option( + 'method', + type : 'combo', + choices : ['auto', 'pkg-config', 'config-tool', 'system'], + value : 'auto', +) |