From 7f042b5fe2c3bf3bdd254aefe5936c20cb4bd293 Mon Sep 17 00:00:00 2001 From: Aleksey Filippov Date: Wed, 14 Mar 2018 20:51:03 +0000 Subject: Use target.get_id() instead of basename and type_suffix concatenation at call site Fixes the bug with flat layout and identical target names in subprojects. Without this change directories are not created with subproject prefix and they can collide. Remove dead makedirs code in Backend.__init__(), during initialization of backend build.targets is empty. Create output directories in Vs2010Backend.generate_projects() instead. Also use double blank line in run_unittests.py according to https://www.python.org/dev/peps/pep-0008/#blank-lines. --- mesonbuild/backend/vs2010backend.py | 1 + 1 file changed, 1 insertion(+) (limited to 'mesonbuild/backend/vs2010backend.py') diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index 7f4c2ef95..3b0dc0e3e 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -304,6 +304,7 @@ class Vs2010Backend(backends.Backend): projlist = [] for name, target in self.build.targets.items(): outdir = os.path.join(self.environment.get_build_dir(), self.get_target_dir(target)) + os.makedirs(outdir, exist_ok=True) fname = name + '.vcxproj' relname = os.path.join(target.subdir, fname) projfile = os.path.join(outdir, fname) -- cgit v1.2.1