diff --git a/mesonbuild/dependencies/cmake.py b/mesonbuild/dependencies/cmake.py index 62d6ebff2..f19efe216 100644 --- a/mesonbuild/dependencies/cmake.py +++ b/mesonbuild/dependencies/cmake.py @@ -548,10 +548,11 @@ class CMakeDependency(ExternalDependency): self.found_modules += [i] rtgt = resolve_cmake_trace_targets(i, self.traceparser, self.env, - clib_compiler=self.clib_compiler, - not_found_warning=lambda x: mlog.warning('CMake: Dependency', mlog.bold(x), 'for', mlog.bold(name), 'was not found') - ) - incDirs += rtgt.include_directories + clib_compiler=self.clib_compiler, + not_found_warning=lambda x: + mlog.warning('CMake: Dependency', mlog.bold(x), 'for', mlog.bold(name), 'was not found') + ) + incDirs += rtgt.include_directories compileOptions += rtgt.public_compile_opts libraries += rtgt.libraries + rtgt.link_flags diff --git a/mesonbuild/mcompile.py b/mesonbuild/mcompile.py index 432de440d..1eb8bff2f 100644 --- a/mesonbuild/mcompile.py +++ b/mesonbuild/mcompile.py @@ -125,7 +125,7 @@ def get_target_from_intro_data(target: ParsedTargetName, builddir: Path, introsp t = i['type'].replace(' ', '_') suggestions.append(f'- ./{p}:{t}') suggestions_str = '\n'.join(suggestions) - raise MesonException(f'Can\'t invoke target `{target.full_name}`: ambiguous name.' \ + raise MesonException(f'Can\'t invoke target `{target.full_name}`: ambiguous name.' f'Add target type and/or path:\n{suggestions_str}') return found_targets[0]