aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2021-10-06 23:29:30 -0700
committerAndres Freund <andres@anarazel.de>2021-10-08 09:17:16 -0700
commitf2e4177c7608e385e17ad1317f1a8404ce165fc9 (patch)
tree49bf71e7c8785d092b73ed21713ec9ace03d2213
parent157f11dc9eb3977736f8755ee455f3d1410a8768 (diff)
downloadmeson-f2e4177c7608e385e17ad1317f1a8404ce165fc9.zip
meson-f2e4177c7608e385e17ad1317f1a8404ce165fc9.tar.gz
meson-f2e4177c7608e385e17ad1317f1a8404ce165fc9.tar.bz2
backend/vs: Name pch pdb files to avoid naming & lock conflicts.
-rw-r--r--mesonbuild/backend/vs2010backend.py7
1 files changed, 7 insertions, 0 deletions
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):