aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/cmake/common.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2024-04-14 12:58:30 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2025-02-13 15:26:44 +0200
commit518c732ea9b0f1975f6f28accff3286be4106538 (patch)
tree2be9544828545a2f9f0676efc6eb82ac197ec4bd /mesonbuild/cmake/common.py
parentea678ed82938ceac00682b2695b57193d36b71b4 (diff)
downloadmeson-optionrefactor3.zip
meson-optionrefactor3.tar.gz
meson-optionrefactor3.tar.bz2
Make all Meson level options overridable per subproject.optionrefactor3
Diffstat (limited to 'mesonbuild/cmake/common.py')
-rw-r--r--mesonbuild/cmake/common.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/cmake/common.py b/mesonbuild/cmake/common.py
index d9ff559..e3ba76b 100644
--- a/mesonbuild/cmake/common.py
+++ b/mesonbuild/cmake/common.py
@@ -52,14 +52,14 @@ blacklist_cmake_defs = [
]
def cmake_is_debug(env: 'Environment') -> bool:
- if OptionKey('b_vscrt') in env.coredata.optstore:
- is_debug = env.coredata.get_option(OptionKey('buildtype')) == 'debug'
- if env.coredata.optstore.get_value('b_vscrt') in {'mdd', 'mtd'}:
+ if 'b_vscrt' in env.coredata.optstore:
+ is_debug = env.coredata.optstore.get_value_for('buildtype') == 'debug'
+ if env.coredata.optstore.get_value_for('b_vscrt') in {'mdd', 'mtd'}:
is_debug = True
return is_debug
else:
# Don't directly assign to is_debug to make mypy happy
- debug_opt = env.coredata.get_option(OptionKey('debug'))
+ debug_opt = env.coredata.optstore.get_value_for('debug')
assert isinstance(debug_opt, bool)
return debug_opt