diff options
author | Peter Harris <pharris@opentext.com> | 2020-06-05 14:14:30 -0400 |
---|---|---|
committer | Peter Harris <peter@harr.ca> | 2020-06-06 12:04:28 -0400 |
commit | 9462f0c7bc96d176561894f4421f3e310a485857 (patch) | |
tree | ae414a202ef52e51328dec17a40dac22ac9168fb /mesonbuild/dependencies | |
parent | 2e30afb23b0f34308c747b1e799b66a2f992d398 (diff) | |
download | meson-9462f0c7bc96d176561894f4421f3e310a485857.zip meson-9462f0c7bc96d176561894f4421f3e310a485857.tar.gz meson-9462f0c7bc96d176561894f4421f3e310a485857.tar.bz2 |
msvc: Avoid spurious openmp link warnings
The linker that comes with MSVC does not understand the /openmp flag.
This results in a string of
LINK : warning LNK4044: unrecognized option '/openmp'; ignored
warnings, one for each static_library linked with an executable.
Avoid this by only setting the linker openmp flag when the compiler is
not MSVC.
Diffstat (limited to 'mesonbuild/dependencies')
-rw-r--r-- | mesonbuild/dependencies/misc.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index 04dee06..5160fba 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -97,7 +97,8 @@ class OpenMPDependency(ExternalDependency): for name in header_names: if self.clib_compiler.has_header(name, '', self.env, dependencies=[self], disable_cache=True)[0]: self.is_found = True - self.compile_args = self.link_args = self.clib_compiler.openmp_flags() + self.compile_args = self.clib_compiler.openmp_flags() + self.link_args = self.clib_compiler.openmp_link_flags() break if not self.is_found: mlog.log(mlog.yellow('WARNING:'), 'OpenMP found but omp.h missing.') |