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