From f2e4177c7608e385e17ad1317f1a8404ce165fc9 Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Wed, 6 Oct 2021 23:29:30 -0700 Subject: backend/vs: Name pch pdb files to avoid naming & lock conflicts. --- mesonbuild/backend/vs2010backend.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index 4c39bd7..89a0371 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -657,6 +657,13 @@ class Vs2010Backend(backends.Backend): pch_file.text = header pch_out = ET.SubElement(inc_cl, 'PrecompiledHeaderOutputFile') pch_out.text = '$(IntDir)$(TargetName)-%s.pch' % lang + + # Need to set the name for the pdb, as cl otherwise gives it a static + # name. Which leads to problems when there is more than one pch + # (e.g. for different languages). + pch_pdb = ET.SubElement(inc_cl, 'ProgramDataBaseFileName') + pch_pdb.text = '$(IntDir)$(TargetName)-%s.pdb' % lang + return header def is_argument_with_msbuild_xml_entry(self, entry): -- cgit v1.1