aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
diff options
context:
space:
mode:
authorPeter Harris <pharris@opentext.com>2020-06-05 14:14:30 -0400
committerPeter Harris <peter@harr.ca>2020-06-06 12:04:28 -0400
commit9462f0c7bc96d176561894f4421f3e310a485857 (patch)
treeae414a202ef52e51328dec17a40dac22ac9168fb /mesonbuild/compilers/compilers.py
parent2e30afb23b0f34308c747b1e799b66a2f992d398 (diff)
downloadmeson-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/compilers/compilers.py')
-rw-r--r--mesonbuild/compilers/compilers.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index b0fa5f5..3d75811 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -1087,6 +1087,9 @@ class Compiler:
def openmp_flags(self):
raise EnvironmentException('Language %s does not support OpenMP flags.' % self.get_display_language())
+ def openmp_link_flags(self):
+ return self.openmp_flags()
+
def language_stdlib_only_link_flags(self):
return []