@@ -267,11 +267,11 @@ def generate(self,
267
267
else :
268
268
raise MesonException ('Unsupported Visual Studio platform: ' + build_machine )
269
269
270
- self .buildtype = self .environment .coredata .get_option (OptionKey ('buildtype' ))
271
- self .optimization = self .environment .coredata .get_option (OptionKey ('optimization' ))
272
- self .debug = self .environment .coredata .get_option (OptionKey ('debug' ))
270
+ self .buildtype = self .environment .coredata .optstore . get_value_for (OptionKey ('buildtype' ))
271
+ self .optimization = self .environment .coredata .optstore . get_value_for (OptionKey ('optimization' ))
272
+ self .debug = self .environment .coredata .optstore . get_value_for (OptionKey ('debug' ))
273
273
try :
274
- self .sanitize = self .environment .coredata .get_option (OptionKey ('b_sanitize' ))
274
+ self .sanitize = self .environment .coredata .optstore . get_value_for (OptionKey ('b_sanitize' ))
275
275
except KeyError :
276
276
self .sanitize = []
277
277
sln_filename = os .path .join (self .environment .get_build_dir (), self .build .project_name + '.sln' )
@@ -422,7 +422,7 @@ def generate_solution(self, sln_filename: str, projlist: T.List[Project]) -> Non
422
422
ofile .write ('# Visual Studio %s\n ' % self .sln_version_comment )
423
423
prj_templ = 'Project("{%s}") = "%s", "%s", "{%s}"\n '
424
424
for prj in projlist :
425
- if self .environment .coredata .get_option (OptionKey ('layout' )) == 'mirror' :
425
+ if self .environment .coredata .optstore . get_value_for (OptionKey ('layout' )) == 'mirror' :
426
426
self .generate_solution_dirs (ofile , prj [1 ].parents )
427
427
target = self .build .targets [prj [0 ]]
428
428
lang = 'default'
@@ -1791,7 +1791,7 @@ def path_normalize_add(path, lis):
1791
1791
# build system as possible.
1792
1792
self .add_target_deps (root , target )
1793
1793
self ._prettyprint_vcxproj_xml (ET .ElementTree (root ), ofname )
1794
- if self .environment .coredata .get_option (OptionKey ('layout' )) == 'mirror' :
1794
+ if self .environment .coredata .optstore . get_value_for (OptionKey ('layout' )) == 'mirror' :
1795
1795
self .gen_vcxproj_filters (target , ofname )
1796
1796
return True
1797
1797
@@ -1960,9 +1960,9 @@ def gen_testproj(self):
1960
1960
meson_build_dir_for_buildtype = build_dir_tail [:- 2 ] + buildtype # Get the buildtype suffixed 'builddir_[debug/release/etc]' from 'builddir_vs', for example.
1961
1961
proj_to_build_dir_for_buildtype = str (os .path .join (proj_to_multiconfigured_builds_parent_dir , meson_build_dir_for_buildtype ))
1962
1962
test_cmd = f'{ nmake_base_meson_command } test -C "{ proj_to_build_dir_for_buildtype } " --no-rebuild'
1963
- if not self .environment .coredata .get_option (OptionKey ('stdsplit' )):
1963
+ if not self .environment .coredata .optstore . get_value_for (OptionKey ('stdsplit' )):
1964
1964
test_cmd += ' --no-stdsplit'
1965
- if self .environment .coredata .get_option (OptionKey ('errorlogs' )):
1965
+ if self .environment .coredata .optstore . get_value_for (OptionKey ('errorlogs' )):
1966
1966
test_cmd += ' --print-errorlogs'
1967
1967
condition = f'\' $(Configuration)|$(Platform)\' ==\' { buildtype } |{ self .platform } \' '
1968
1968
prop_group = ET .SubElement (root , 'PropertyGroup' , Condition = condition )
@@ -1984,9 +1984,9 @@ def gen_testproj(self):
1984
1984
ET .SubElement (midl , 'ProxyFileName' ).text = '%(Filename)_p.c'
1985
1985
# FIXME: No benchmarks?
1986
1986
test_command = self .environment .get_build_command () + ['test' , '--no-rebuild' ]
1987
- if not self .environment .coredata .get_option (OptionKey ('stdsplit' )):
1987
+ if not self .environment .coredata .optstore . get_value_for (OptionKey ('stdsplit' )):
1988
1988
test_command += ['--no-stdsplit' ]
1989
- if self .environment .coredata .get_option (OptionKey ('errorlogs' )):
1989
+ if self .environment .coredata .optstore . get_value_for (OptionKey ('errorlogs' )):
1990
1990
test_command += ['--print-errorlogs' ]
1991
1991
self .serialize_tests ()
1992
1992
self .add_custom_build (root , 'run_tests' , '"%s"' % ('" "' .join (test_command )))
0 commit comments