aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/cmake.py
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2019-05-08 14:39:58 +0100
committerDylan Baker <dylan@pnwbakers.com>2019-05-20 11:29:17 -0700
commit58870fda1666c43a8bb793b52f658e37f4d51c67 (patch)
treeec0aeef775ee287271413f3ecd38c6f4d8d9d361 /mesonbuild/modules/cmake.py
parentcf662ded46076c053ee1d30761fdc6d8a7b089a4 (diff)
downloadmeson-58870fda1666c43a8bb793b52f658e37f4d51c67.zip
meson-58870fda1666c43a8bb793b52f658e37f4d51c67.tar.gz
meson-58870fda1666c43a8bb793b52f658e37f4d51c67.tar.bz2
Remove compilers from ModuleState object
It doesn't make much sense to have this and not also have cross-compilers (so any use of this is already pretty suspect as probably wrong when cross-compiling). This information is accessible anyhow via environment.coredata.
Diffstat (limited to 'mesonbuild/modules/cmake.py')
-rw-r--r--mesonbuild/modules/cmake.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py
index 6af4adb..d72ceca 100644
--- a/mesonbuild/modules/cmake.py
+++ b/mesonbuild/modules/cmake.py
@@ -52,7 +52,8 @@ class CmakeModule(ExtensionModule):
super().__init__(interpreter)
self.snippets.add('configure_package_config_file')
- def detect_voidp_size(self, compilers, env):
+ def detect_voidp_size(self, env):
+ compilers = env.coredata.compilers
compiler = compilers.get('c', None)
if not compiler:
compiler = compilers.get('cpp', None)
@@ -115,7 +116,7 @@ class CmakeModule(ExtensionModule):
conf = {
'CVF_VERSION': (version, ''),
- 'CMAKE_SIZEOF_VOID_P': (str(self.detect_voidp_size(state.compilers, state.environment)), '')
+ 'CMAKE_SIZEOF_VOID_P': (str(self.detect_voidp_size(state.environment)), '')
}
mesonlib.do_conf_file(template_file, version_file, conf, 'meson')