diff options
| author | Dudemanguy <random342@airmail.cc> | 2023-10-20 16:50:43 -0500 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2023-10-25 23:43:40 +0300 |
| commit | e9e098b73e116c865ae0e52bb29001740b23ba22 (patch) | |
| tree | 2954d60fb42dd866bd903a48217fc67fc8fdb726 /test cases/cmake/26 dependency fallback/subprojects/cmMod/cmMod.cpp | |
| parent | ae7a9b0f4430a055ac419c6f1157cbd0e6eed45c (diff) | |
| download | meson-e9e098b73e116c865ae0e52bb29001740b23ba22.tar.gz | |
build: improve the warning for executables with the same name
adb1a360b9f9edb26eda233326b1d539baeccd5b added the feature and also the
usual meson-style warning to users that might be using the feature but
were not targeting a new enough meson version. Well unfortunately the
warning both doesn't actually work (it didn't take different directories
into account) and is also really slow because it creates an O(N^2) loop
for checking this.
Instead, rework this by adding an additional set that stores a tuple
containing the target name and its subdirectory. We only add this tuple
if the target is an executable since it is the only time it will be
relevant. After that, simply check if the name + subdir combination
already exists in the set along with the target being executable. If so,
then we execute FeatureNew which may possibly warn. This is a simply
O(1) lookup which is way faster. Fixes #12404.
Diffstat (limited to 'test cases/cmake/26 dependency fallback/subprojects/cmMod/cmMod.cpp')
0 files changed, 0 insertions, 0 deletions
