diff options
-rw-r--r-- | MANIFEST.in | 6 | ||||
-rw-r--r-- | mesonbuild/backend/vs2010backend.py | 14 | ||||
-rw-r--r-- | mesonbuild/cmake/executor.py | 2 | ||||
-rw-r--r-- | mesonbuild/cmake/traceparser.py | 2 | ||||
-rw-r--r-- | mesonbuild/compilers/mixins/clike.py | 2 |
5 files changed, 9 insertions, 17 deletions
diff --git a/MANIFEST.in b/MANIFEST.in index 13f7949..11c804a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,10 +4,9 @@ graft cross graft data graft graphics graft man -graft syntax-highlighting graft tools -include authors.txt -include contributing.txt + +include contributing.md include COPYING include README.md include run_cross_test.py @@ -15,7 +14,6 @@ include run_tests.py include run_unittests.py include run_meson_command_tests.py include run_project_tests.py -include mesonrewriter.py include ghwt.py include __main__.py include meson.py diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index ef849e1..80ff910 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -591,10 +591,8 @@ class Vs2010Backend(backends.Backend): raise MesonException('Could not guess language from source file %s.' % src) def add_pch(self, pch_sources, lang, inc_cl): - if len(pch_sources) <= 1: - # We only need per file precompiled headers if we have more than 1 language. - return - self.use_pch(pch_sources, lang, inc_cl) + if lang in pch_sources: + self.use_pch(pch_sources, lang, inc_cl) def create_pch(self, pch_sources, lang, inc_cl): pch = ET.SubElement(inc_cl, 'PrecompiledHeader') @@ -602,6 +600,8 @@ class Vs2010Backend(backends.Backend): self.add_pch_files(pch_sources, lang, inc_cl) def use_pch(self, pch_sources, lang, inc_cl): + pch = ET.SubElement(inc_cl, 'PrecompiledHeader') + pch.text = 'Use' header = self.add_pch_files(pch_sources, lang, inc_cl) pch_include = ET.SubElement(inc_cl, 'ForcedIncludeFiles') pch_include.text = header + ';%(ForcedIncludeFiles)' @@ -1046,12 +1046,10 @@ class Vs2010Backend(backends.Backend): # Note: SuppressStartupBanner is /NOLOGO and is 'true' by default pch_sources = {} if self.environment.coredata.base_options.get('b_pch', False): - pch_node = ET.SubElement(clconf, 'PrecompiledHeader') for lang in ['c', 'cpp']: pch = target.get_pch(lang) if not pch: continue - pch_node.text = 'Use' if compiler.id == 'msvc': if len(pch) == 1: # Auto generate PCH. @@ -1065,10 +1063,6 @@ class Vs2010Backend(backends.Backend): # I don't know whether its relevant but let's handle other compilers # used with a vs backend pch_sources[lang] = [pch[0], None, lang, None] - if len(pch_sources) == 1: - # If there is only 1 language with precompiled headers, we can use it for the entire project, which - # is cleaner than specifying it for each source file. - self.use_pch(pch_sources, list(pch_sources)[0], clconf) resourcecompile = ET.SubElement(compiles, 'ResourceCompile') ET.SubElement(resourcecompile, 'PreprocessorDefinitions') diff --git a/mesonbuild/cmake/executor.py b/mesonbuild/cmake/executor.py index a41b293..66713a1 100644 --- a/mesonbuild/cmake/executor.py +++ b/mesonbuild/cmake/executor.py @@ -132,7 +132,7 @@ class CMakeExecutor: msg += '\n\nOn Unix-like systems this is often caused by scripts that are not executable.' mlog.warning(msg) return None - cmvers = re.sub(r'\s*cmake version\s*', '', out.split('\n')[0]).strip() + cmvers = re.sub(r'\s*(cmake|cmake3) version\s*', '', out.split('\n')[0]).strip() return cmvers def set_exec_mode(self, print_cmout: T.Optional[bool] = None, always_capture_stderr: T.Optional[bool] = None) -> None: diff --git a/mesonbuild/cmake/traceparser.py b/mesonbuild/cmake/traceparser.py index 432cd21..0aee3fa 100644 --- a/mesonbuild/cmake/traceparser.py +++ b/mesonbuild/cmake/traceparser.py @@ -655,7 +655,7 @@ class CMakeTraceParser: # Try joining file paths that contain spaces - reg_start = re.compile(r'^([A-Za-z]:)?/.*/[^./]+$') + reg_start = re.compile(r'^([A-Za-z]:)?/(.*/)*[^./]+$') reg_end = re.compile(r'^.*\.[a-zA-Z]+$') fixed_list = [] # type: T.List[str] diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index 24f4796..124c49c 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -919,7 +919,7 @@ class CLikeCompiler: for f in files: if not f.is_file(): continue - archs = mesonlib.darwin_get_object_archs(f) + archs = mesonlib.darwin_get_object_archs(str(f)) if archs and env.machines.host.cpu_family in archs: return f else: |