summaryrefslogtreecommitdiff
path: root/mesonbuild/cmake/generator.py
AgeCommit message (Collapse)Author
2025-10-03cmake: warn about unknown generator expressionsJan200101
If a given project uses a generator expression that meson does not support it will change the outcome and potentially result in wrong behavior, the user should be aware of that so they can deal with it.
2024-09-11Fix typosspaette
2023-12-13Use SPDX-License-Identifier consistentlyDylan Baker
This replaces all of the Apache blurbs at the start of each file with an `# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing uses to be consistent in capitalization, and to be placed above any copyright notices. This removes nearly 3000 lines of boilerplate from the project (only python files), which no developer cares to look at. SPDX is in common use, particularly in the Linux kernel, and is the recommended format for Meson's own `project(license: )` field
2023-08-11treewide: automatic rewriting of all comment-style type annotationsEli Schwartz
Performed using https://github.com/ilevkivskyi/com2ann This has no actual effect on the codebase as type checkers (still) support both and negligible effect on runtime performance since __future__ annotations ameliorates that. Technically, the bytecode would be bigger for non function-local annotations, of which we have many either way. So if it doesn't really matter, why do a large-scale refactor? Simple: because people keep wanting to, but it's getting nickle-and-dimed. If we're going to do this we might as well do it consistently in one shot, using tooling that guarantees repeatability and correctness. Repeat with: ``` com2ann mesonbuild/ ```
2023-08-11remove useless type annotationsEli Schwartz
These annotations all had a default initializer of the correct type, or a parent class annotation.
2023-07-19cmake: fix empty BOOL generator expression evaluating to truekiwixz
2023-02-01treewide: add future annotations importEli Schwartz
2022-11-30pylint: enable the set_membership pluginDylan Baker
Which adds the `use-set-for-membership` check. It's generally faster in python to use a set with the `in` keyword, because it's a hash check instead of a linear walk, this is especially true with strings, where it's actually O(n^2), one loop over the container, and an inner loop of the strings (as string comparison works by checking that `a[n] == b[n]`, in a loop). Also, I'm tired of complaining about this in reviews, let the tools do it for me :)
2022-10-04pylint: enable use-a-generatorDylan Baker
This catches some optimization problems, mostly in the use of `all()` and `any()`. Basically writing `any([x == 5 for x in f])` vs `any(x == 5 for x in f)` reduces the performance because the entire concrete list must first be created, then iterated over, while in the second f is iterated and checked element by element.
2022-07-18Applied tristan957's suggestionsVolker Weißmann
2022-07-18cmake module: Better warnings and error messages in some cases.Volker Weißmann
2022-01-23cmake: Add TARGET_ generator expression support (fixes #9305)Daniel Mensinger
2022-01-23cmake: Move generator expression evaluation to the end of the traceparserDaniel Mensinger
2021-05-29cmake: CMakeTraceParser improvementsDaniel Mensinger
- handle cached CMake variables differently - associate variables with source files - better performance (str to Path and generator expressions)
2020-09-28typing: fully annotate cmake.generatorDaniel Mensinger
2019-07-31cmake: Parse a subset of generator expressionsDaniel Mensinger