cmake: Always create missing includes in build dir

There really isn't any reason to not always create missing
include directories inside the build dir. Just restricting
this to generate generated sources should work in an ideal
world, however, there exists lots of suboptimal CMake code
where this assumption is not always true.
pull/7896/head
Daniel Mensinger 4 years ago
parent e8399c8c6e
commit 1eb9d8ad6e
  1. 5
      mesonbuild/cmake/interpreter.py

@ -435,10 +435,7 @@ class ConverterTarget:
x = x.resolve() x = x.resolve()
assert x.is_absolute() assert x.is_absolute()
if not x.exists() and not any([x.name.endswith(y) for y in obj_suffixes]) and not is_generated: if not x.exists() and not any([x.name.endswith(y) for y in obj_suffixes]) and not is_generated:
if ( if path_is_in_root(x, Path(self.env.get_build_dir()), resolve=True):
any([path_is_in_root(root_src_dir / y, x.resolve(), resolve=True) for y in self.generated_raw])
and path_is_in_root(x, Path(self.env.get_build_dir()), resolve=True)
):
x.mkdir(parents=True, exist_ok=True) x.mkdir(parents=True, exist_ok=True)
return x.relative_to(Path(self.env.get_build_dir()) / subdir) return x.relative_to(Path(self.env.get_build_dir()) / subdir)
else: else:

Loading…
Cancel
Save