aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/options.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/options.py')
-rw-r--r--mesonbuild/options.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mesonbuild/options.py b/mesonbuild/options.py
index d83a312..e88710d 100644
--- a/mesonbuild/options.py
+++ b/mesonbuild/options.py
@@ -8,6 +8,7 @@ import argparse
from .mesonlib import (
HoldableObject,
OptionKey,
+ OptionType,
default_prefix,
default_datadir,
default_includedir,
@@ -536,3 +537,10 @@ class OptionStore:
def get(self, *args, **kwargs) -> UserOption:
return self.d.get(*args, **kwargs)
+
+ def is_project_option(self, key: OptionKey) -> bool:
+ """Convenience method to check if this is a project option."""
+ return key.type is OptionType.PROJECT
+
+ def is_reserved_name(self, key: OptionKey) -> bool:
+ return not self.is_project_option(key)