cmake: exclude generated files from the buildsystem files list

pull/8812/head
Daniel Mensinger 4 years ago
parent 06f528a5b7
commit f0812baf8d
No known key found for this signature in database
GPG Key ID: 54DD94C131E277D4
  1. 2
      mesonbuild/cmake/interpreter.py

@ -953,6 +953,7 @@ class CMakeInterpreter:
cmake_files = self.fileapi.get_cmake_sources() cmake_files = self.fileapi.get_cmake_sources()
self.bs_files = [x.file for x in cmake_files if not x.is_cmake and not x.is_temp] self.bs_files = [x.file for x in cmake_files if not x.is_cmake and not x.is_temp]
self.bs_files = [relative_to_if_possible(x, Path(self.env.get_source_dir())) for x in self.bs_files] self.bs_files = [relative_to_if_possible(x, Path(self.env.get_source_dir())) for x in self.bs_files]
self.bs_files = [x for x in self.bs_files if not path_is_in_root(x, Path(self.env.get_build_dir()), resolve=True)]
self.bs_files = list(OrderedSet(self.bs_files)) self.bs_files = list(OrderedSet(self.bs_files))
# Load the codemodel configurations # Load the codemodel configurations
@ -980,6 +981,7 @@ class CMakeInterpreter:
src_dir = bs_reply.src_dir src_dir = bs_reply.src_dir
self.bs_files = [x.file for x in bs_reply.build_files if not x.is_cmake and not x.is_temp] self.bs_files = [x.file for x in bs_reply.build_files if not x.is_cmake and not x.is_temp]
self.bs_files = [relative_to_if_possible(src_dir / x, Path(self.env.get_source_dir()), resolve=True) for x in self.bs_files] self.bs_files = [relative_to_if_possible(src_dir / x, Path(self.env.get_source_dir()), resolve=True) for x in self.bs_files]
self.bs_files = [x for x in self.bs_files if not path_is_in_root(x, Path(self.env.get_build_dir()), resolve=True)]
self.bs_files = list(OrderedSet(self.bs_files)) self.bs_files = list(OrderedSet(self.bs_files))
self.codemodel_configs = cm_reply.configs self.codemodel_configs = cm_reply.configs

Loading…
Cancel
Save