summaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-11-03 10:25:27 -0800
committerDylan Baker <dylan@pnwbakers.com>2025-11-12 08:14:37 -0800
commit8b30058c0f845fd85515865b4fca8cd0f8ab10ce (patch)
tree17e1e92a12d59d0f6b1aec80b6c519acf88b5b07 /mesonbuild/interpreter
parent20124c8c2711d683e79a79efbc3b7c3e7df414eb (diff)
downloadmeson-8b30058c0f845fd85515865b4fca8cd0f8ab10ce.tar.gz
interpreter: move deprecation validation for *_pch to the interpreter
Diffstat (limited to 'mesonbuild/interpreter')
-rw-r--r--mesonbuild/interpreter/type_checking.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/type_checking.py b/mesonbuild/interpreter/type_checking.py
index 700041671..e582cd91b 100644
--- a/mesonbuild/interpreter/type_checking.py
+++ b/mesonbuild/interpreter/type_checking.py
@@ -13,7 +13,7 @@ from ..build import (CustomTarget, BuildTarget,
BothLibraries, SharedLibrary, StaticLibrary, Jar, Executable, StructuredSources)
from ..options import OptionKey, UserFeatureOption
from ..dependencies import Dependency, DependencyMethods, InternalDependency
-from ..interpreterbase.decorators import KwargInfo, ContainerTypeInfo, FeatureBroken
+from ..interpreterbase.decorators import KwargInfo, ContainerTypeInfo, FeatureBroken, FeatureDeprecated
from ..mesonlib import (File, FileMode, MachineChoice, has_path_sep, listify, stringlistify,
EnvironmentVariables)
from ..programs import ExternalProgram
@@ -658,12 +658,18 @@ def _pch_validator(args: T.List[str]) -> T.Optional[str]:
return None
+def _pch_feature_validator(args: T.List[str]) -> T.Iterable[FeatureCheckBase]:
+ if len(args) > 1:
+ yield FeatureDeprecated('PCH source files', '0.50.0', 'Only a single header file should be used.')
+
+
_PCH_ARGS: KwargInfo[T.List[str]] = KwargInfo(
'pch',
ContainerTypeInfo(list, str),
listify=True,
default=[],
validator=_pch_validator,
+ feature_validator=_pch_feature_validator,
)