diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-11-03 10:28:52 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-11-12 08:14:37 -0800 |
| commit | 6198aaa30c99fc3c183dfdacf789fa05d9d268d8 (patch) | |
| tree | 1807dcf13df7b4076092bd68d9ad3acfbeaaf779 /mesonbuild/build.py | |
| parent | 8b30058c0f845fd85515865b4fca8cd0f8ab10ce (diff) | |
| download | meson-6198aaa30c99fc3c183dfdacf789fa05d9d268d8.tar.gz | |
interpreter: Move most of the remaining validation to the Interpreter
What's left requires the Environment, so it will have to be handled in
the interpreter implementation for now.
Diffstat (limited to 'mesonbuild/build.py')
| -rw-r--r-- | mesonbuild/build.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 8241efa1d..03b1f3db8 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1593,23 +1593,6 @@ class BuildTarget(Target): def add_pch(self, language: str, pchlist: T.List[str]) -> None: if not pchlist: return - elif len(pchlist) == 1: - if not is_header(pchlist[0]): - raise InvalidArguments(f'PCH argument {pchlist[0]} is not a header.') - elif len(pchlist) == 2: - if is_header(pchlist[0]): - if not is_source(pchlist[1]): - raise InvalidArguments('PCH definition must contain one header and at most one source.') - elif is_source(pchlist[0]): - if not is_header(pchlist[1]): - raise InvalidArguments('PCH definition must contain one header and at most one source.') - pchlist = [pchlist[1], pchlist[0]] - else: - raise InvalidArguments(f'PCH argument {pchlist[0]} is of unknown type.') - - if os.path.dirname(pchlist[0]) != os.path.dirname(pchlist[1]): - raise InvalidArguments('PCH files must be stored in the same folder.') - for f in pchlist: if not os.path.isfile(os.path.join(self.environment.source_dir, self.subdir, f)): raise MesonException(f'File {f} does not exist.') |
