diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-07-28 23:50:37 -0400 |
---|---|---|
committer | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-07-30 15:33:11 -0400 |
commit | c2f2e511050d13b7e9e8182c72a507c2d33da97f (patch) | |
tree | 40a80b91d4801acc4e6d16b2f1e5afeaeb81129e /test cases | |
parent | 902d0e579e086cd2733840f7eb5fb90078f1c8b2 (diff) | |
download | meson-c2f2e511050d13b7e9e8182c72a507c2d33da97f.zip meson-c2f2e511050d13b7e9e8182c72a507c2d33da97f.tar.gz meson-c2f2e511050d13b7e9e8182c72a507c2d33da97f.tar.bz2 |
PGI: fix openmp for 190common test
since there is no pgc++ on Windows, we avoid invoking that in 190common
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/common/190 openmp/meson.build | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/test cases/common/190 openmp/meson.build b/test cases/common/190 openmp/meson.build index 71bf697..a1154c2 100644 --- a/test cases/common/190 openmp/meson.build +++ b/test cases/common/190 openmp/meson.build @@ -1,4 +1,4 @@ -project('openmp', 'c', 'cpp') +project('openmp', 'c') cc = meson.get_compiler('c') if cc.get_id() == 'gcc' and cc.version().version_compare('<4.2.0') @@ -21,21 +21,22 @@ if host_machine.system() == 'darwin' endif openmp = dependency('openmp') +env = environment() +env.set('OMP_NUM_THREADS', '2') exec = executable('exec', 'main.c', dependencies : [openmp]) - -execpp = executable('execpp', - 'main.cpp', - dependencies : [openmp]) - -env = environment() -env.set('OMP_NUM_THREADS', '2') - test('OpenMP C', exec, env : env) -test('OpenMP C++', execpp, env : env) +if not(build_machine.system() == 'windows' and cc.get_id() == 'pgi') + if add_languages('cpp', required : false) + execpp = executable('execpp', + 'main.cpp', + dependencies : [openmp]) + test('OpenMP C++', execpp, env : env) + endif +endif if add_languages('fortran', required : false) # Mixing compilers (msvc/clang with gfortran) does not seem to work on Windows. |