aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/dev.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-06-19 09:31:32 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-06-20 11:27:08 +0000
commitd73748815014b8b4bbbd7fe7fb8b50b8a75aecfc (patch)
treedc535b92cd6f496fbc6cb4153fad7449f286d45a /mesonbuild/dependencies/dev.py
parentebda6ef9c801278bd15a6499c80fff26071feded (diff)
downloadmeson-d73748815014b8b4bbbd7fe7fb8b50b8a75aecfc.zip
meson-d73748815014b8b4bbbd7fe7fb8b50b8a75aecfc.tar.gz
meson-d73748815014b8b4bbbd7fe7fb8b50b8a75aecfc.tar.bz2
dependencies: Don't assume self.compiler is a C compiler
All dependencies were using find_library, has_header, get_define, etc on self.compiler assuming that it's a compiler that outputs and consumes C-like libraries. This is not true for D (and in the future, for Rust) since although they can consume C libraries, they do not use the C ecosystem. For such purposes, we now have self.clib_compiler. Nothing uses self.compiler anymore as a result, and it has been removed.
Diffstat (limited to 'mesonbuild/dependencies/dev.py')
-rw-r--r--mesonbuild/dependencies/dev.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index ffd9666..cdee8ed 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -36,8 +36,8 @@ class GTestDependency(ExternalDependency):
def detect(self):
self.version = '1.something_maybe'
- gtest_detect = self.compiler.find_library("gtest", self.env, [])
- gtest_main_detect = self.compiler.find_library("gtest_main", self.env, [])
+ gtest_detect = self.clib_compiler.find_library("gtest", self.env, [])
+ gtest_main_detect = self.clib_compiler.find_library("gtest_main", self.env, [])
if gtest_detect and (not self.main or gtest_main_detect):
self.is_found = True
self.compile_args = []
@@ -83,7 +83,7 @@ class GMockDependency(ExternalDependency):
self.version = '1.something_maybe'
# GMock may be a library or just source.
# Work with both.
- gmock_detect = self.compiler.find_library("gmock", self.env, [])
+ gmock_detect = self.clib_compiler.find_library("gmock", self.env, [])
if gmock_detect:
self.is_found = True
self.compile_args = []