diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2023-11-27 10:26:23 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2023-12-01 16:19:16 -0800 |
| commit | a85353cd8326175e719b913ff9aa46e3daf20497 (patch) | |
| tree | e87ae892363a75d4f499e9bb4388ad48dde3fea6 /mesonbuild/cmake/tracetargets.py | |
| parent | 52638e8c65e15c9ea1523d7ba7a564ee91e6a59e (diff) | |
| download | meson-a85353cd8326175e719b913ff9aa46e3daf20497.tar.gz | |
cmake: Handle compiler.find_library returning None
I'm not 100% sure that warning is the appropriate action, but it's
better than failing with a backtrace.
Fixes: #12555
Diffstat (limited to 'mesonbuild/cmake/tracetargets.py')
| -rw-r--r-- | mesonbuild/cmake/tracetargets.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/cmake/tracetargets.py b/mesonbuild/cmake/tracetargets.py index bb5faa395..20c7462d1 100644 --- a/mesonbuild/cmake/tracetargets.py +++ b/mesonbuild/cmake/tracetargets.py @@ -55,7 +55,11 @@ def resolve_cmake_trace_targets(target_name: str, # CMake brute-forces a combination of prefix/suffix combinations to find the # right library. Assume any bare argument passed which is not also a CMake # target must be a system library we should try to link against. - res.libraries += clib_compiler.find_library(curr, env, []) + flib = clib_compiler.find_library(curr, env, []) + if flib is not None: + res.libraries += flib + else: + not_found_warning(curr) else: not_found_warning(curr) continue |
