From 9b22147dcb0c31cc374ebf6b059f225530401a51 Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Fri, 19 Apr 2019 10:32:33 +0200 Subject: [PATCH] cmake: set the linker for clang-cl for CMake --- mesonbuild/cmake/interpreter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py index e1ba7ebed..da14a0632 100644 --- a/mesonbuild/cmake/interpreter.py +++ b/mesonbuild/cmake/interpreter.py @@ -306,6 +306,8 @@ class CMakeInterpreter: elif len(exelist) == 2: cmake_args += ['-DCMAKE_{}_COMPILER_LAUNCHER={}'.format(cmake_lang, exelist[0]), '-DCMAKE_{}_COMPILER={}'.format(cmake_lang, exelist[1])] + if hasattr(comp, 'get_linker_exelist') and comp.get_id() == 'clang-cl': + cmake_args += ['-DCMAKE_LINKER={}'.format(comp.get_linker_exelist()[0])] cmake_args += ['-G', generator] cmake_args += ['-DCMAKE_INSTALL_PREFIX={}'.format(self.install_prefix)] cmake_args += extra_cmake_options