aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/vs2010backend.py
diff options
context:
space:
mode:
authorNicolas Schneider <nioncode+git@gmail.com>2016-03-24 22:19:55 +0100
committerNicolas Schneider <nioncode+git@gmail.com>2016-03-24 23:44:44 +0100
commit0c4aab6eed77d62c41006d6944b46f881610599d (patch)
treef43b25e1e3253d68f43c7342de06e214c842c947 /mesonbuild/backend/vs2010backend.py
parent7019daaab04cac0be83451055e267ad7d6b1c5f6 (diff)
downloadmeson-0c4aab6eed77d62c41006d6944b46f881610599d.zip
meson-0c4aab6eed77d62c41006d6944b46f881610599d.tar.gz
meson-0c4aab6eed77d62c41006d6944b46f881610599d.tar.bz2
vs2010: support same source file names in different subdirs
Diffstat (limited to 'mesonbuild/backend/vs2010backend.py')
-rw-r--r--mesonbuild/backend/vs2010backend.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 84ef8c3..fac7358 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -566,6 +566,11 @@ class Vs2010Backend(backends.Backend):
inc_cl = ET.SubElement(inc_src, 'CLCompile', Include=relpath)
self.add_pch(inc_cl, proj_to_src_dir, pch_sources, s)
self.add_additional_options(s, inc_cl, extra_args, additional_options_set)
+ basename = os.path.basename(s.fname)
+ if basename in target.sources_conflicts:
+ obj_name = '.'.join(s.split('.')[:-1]).replace('/', '_')\
+ + '.' + self.environment.get_object_suffix()
+ ET.SubElement(inc_cl, 'ObjectFileName').text = "$(IntDir)" + obj_name
for s in gen_src:
relpath = self.relpath(s, target.subdir)
inc_cl = ET.SubElement(inc_src, 'CLCompile', Include=relpath)