aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2022-04-28 19:20:24 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2022-05-01 23:45:08 +0300
commit1a80e5b35ed79ac67461d54346a9299df3b9c4c3 (patch)
tree744d7f4793865d722bc14f45384e5e0ecfebf497 /mesonbuild/dependencies
parentd771fc7d0b45f8fa66f6570720fba73941de67cd (diff)
downloadmeson-1a80e5b35ed79ac67461d54346a9299df3b9c4c3.zip
meson-1a80e5b35ed79ac67461d54346a9299df3b9c4c3.tar.gz
meson-1a80e5b35ed79ac67461d54346a9299df3b9c4c3.tar.bz2
cmake: Fix CMake LLVM dependency error (fixes #10322)
Diffstat (limited to 'mesonbuild/dependencies')
-rw-r--r--mesonbuild/dependencies/dev.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index 97d1633..c2b1a08 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -30,7 +30,7 @@ from .. import mesonlib, mlog
from ..compilers import AppleClangCCompiler, AppleClangCPPCompiler, detect_compiler_for
from ..environment import get_llvm_tool_names
from ..mesonlib import version_compare, stringlistify, extract_as_list
-from .base import DependencyException, DependencyMethods, strip_system_libdirs, SystemDependency
+from .base import DependencyException, DependencyMethods, strip_system_libdirs, SystemDependency, ExternalDependency, DependencyTypeName
from .cmake import CMakeDependency
from .configtool import ConfigToolDependency
from .factory import DependencyFactory
@@ -411,7 +411,14 @@ class LLVMDependencyCMake(CMakeDependency):
else:
compilers = env.coredata.compilers.host
if not compilers or not all(x in compilers for x in ('c', 'cpp')):
- self.is_found = False
+ # Initialize basic variables
+ ExternalDependency.__init__(self, DependencyTypeName('cmake'), env, kwargs)
+
+ # Initialize CMake specific variables
+ self.found_modules: T.List[str] = []
+ self.name = name
+
+ # Warn and return
mlog.warning('The LLVM dependency was not found via CMake since both a C and C++ compiler are required.')
return