From c8a626b56988c5e4a724af708899d0d1e1733ade Mon Sep 17 00:00:00 2001 From: tteuling Date: Thu, 18 Jan 2018 21:21:19 +0100 Subject: [PATCH] Issue #542: Fix OPENMP build for clang. test fail because of clang openmp library missing. --- meson.build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 201bf4e0b..300f8b5a1 100644 --- a/meson.build +++ b/meson.build @@ -26,8 +26,13 @@ else endif if compiler.has_argument('-fopenmp') - add_global_arguments('-fopenmp', language: 'cpp') - add_global_link_arguments('-fopenmp', language: 'cpp') + if (compiler.get_id()=='gcc') + add_global_arguments('-fopenmp', language: 'cpp') + add_global_link_arguments('-fopenmp', language: 'cpp') + elif (compiler.get_id()=='clang') + add_global_arguments('-fopenmp', language: 'cpp') + add_global_link_arguments('-fopenmp=libomp', language: 'cpp') + endif endif if compiler.get_id()=='msvc'