aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/interpreter/type_checking.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mesonbuild/interpreter/type_checking.py b/mesonbuild/interpreter/type_checking.py
index 9cee495..0783c2c 100644
--- a/mesonbuild/interpreter/type_checking.py
+++ b/mesonbuild/interpreter/type_checking.py
@@ -13,6 +13,7 @@ from ..build import (CustomTarget, BuildTarget,
BothLibraries, SharedLibrary, StaticLibrary, Jar, Executable)
from ..coredata import UserFeatureOption
from ..dependencies import Dependency, InternalDependency
+from ..interpreterbase import FeatureNew
from ..interpreterbase.decorators import KwargInfo, ContainerTypeInfo
from ..mesonlib import (
File, FileMode, MachineChoice, listify, has_path_sep, OptionKey,
@@ -26,6 +27,7 @@ if T.TYPE_CHECKING:
from typing_extensions import Literal
from ..interpreterbase import TYPE_var
+ from ..interpreterbase.decorators import FeatureCheckBase
def in_set_validator(choices: T.Set[str]) -> T.Callable[[str], T.Optional[str]]:
"""Check that the choice given was one of the given set."""
@@ -373,6 +375,13 @@ INCLUDE_DIRECTORIES: KwargInfo[T.List[T.Union[str, IncludeDirs]]] = KwargInfo(
default=[],
)
+def include_dir_string_new(val: T.List[T.Union[str, IncludeDirs]]) -> T.Iterable[FeatureCheckBase]:
+ strs = [v for v in val if isinstance(v, str)]
+ if strs:
+ str_msg = ", ".join(f"'{s}'" for s in strs)
+ yield FeatureNew('include_directories kwarg of type string', '1.0.0',
+ f'Use include_directories({str_msg}) instead')
+
# for cases like default_options and override_options
DEFAULT_OPTIONS: KwargInfo[T.List[str]] = KwargInfo(
'default_options',