aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/cmake.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-12-06 15:27:45 -0800
committerEli Schwartz <eschwartz93@gmail.com>2022-01-18 17:53:29 -0500
commit5074e2d3b5837f64ef008b359e50765675c528ab (patch)
treeddea2131d2acc9e53c091add12a618ca8d7042fb /mesonbuild/modules/cmake.py
parent23af9e4c1a77072218bc3123bc1151b4845049d5 (diff)
downloadmeson-5074e2d3b5837f64ef008b359e50765675c528ab.zip
meson-5074e2d3b5837f64ef008b359e50765675c528ab.tar.gz
meson-5074e2d3b5837f64ef008b359e50765675c528ab.tar.bz2
interpreter: replace ConfigurationDataObject with ConfigurationDataHolder
This is much cleaner, and more in line with the way we handle interpreter objects in modern meson practice
Diffstat (limited to 'mesonbuild/modules/cmake.py')
-rw-r--r--mesonbuild/modules/cmake.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py
index 0c61b47..0f325f5 100644
--- a/mesonbuild/modules/cmake.py
+++ b/mesonbuild/modules/cmake.py
@@ -20,7 +20,7 @@ from . import ExtensionModule, ModuleReturnValue, ModuleObject
from .. import build, mesonlib, mlog, dependencies
from ..cmake import SingleTargetOptions, TargetOptions, cmake_defines_to_args
-from ..interpreter import ConfigurationDataObject, SubprojectHolder
+from ..interpreter import SubprojectHolder
from ..interpreterbase import (
FeatureNew,
FeatureNewKwargs,
@@ -358,7 +358,7 @@ class CmakeModule(ExtensionModule):
if 'configuration' not in kwargs:
raise mesonlib.MesonException('"configuration" not specified.')
conf = kwargs['configuration']
- if not isinstance(conf, ConfigurationDataObject):
+ if not isinstance(conf, build.ConfigurationData):
raise mesonlib.MesonException('Argument "configuration" is not of type configuration_data')
prefix = state.environment.coredata.get_option(mesonlib.OptionKey('prefix'))
@@ -372,8 +372,8 @@ class CmakeModule(ExtensionModule):
extra = PACKAGE_INIT_EXT.replace('@absInstallDir@', abs_install_dir)
extra = extra.replace('@installPrefix@', prefix)
- self.create_package_file(ifile_abs, ofile_abs, PACKAGE_RELATIVE_PATH, extra, conf.conf_data)
- conf.mark_used()
+ self.create_package_file(ifile_abs, ofile_abs, PACKAGE_RELATIVE_PATH, extra, conf)
+ conf.used = True
conffile = os.path.normpath(inputfile.relative_name())
if conffile not in self.interpreter.build_def_files: