Skip to content

Commit 2b4927b

Browse files
committed
Update the build dir to be at top level for projects
1 parent d218b67 commit 2b4927b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

project_future.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,15 @@ def target_param(self):
9999
def get_build_command(self, incremental=False):
100100
project_param = self.project_param
101101
target_param = self.target_param
102-
build_dir = os.path.join(os.path.dirname(self._project),
103-
'build')
102+
try:
103+
build_parent_dir = common.check_execute_output([
104+
'git', '-C', os.path.dirname(self._project),
105+
'rev-parse', '--show-toplevel'])
106+
except common.ExecuteCommandFailure as error:
107+
build_parent_dir = os.path.dirname(self._project)
108+
109+
build_dir = os.path.join(build_parent_dir, 'build')
110+
104111
build = ['clean', 'build']
105112
if incremental:
106113
build = ['build']

0 commit comments

Comments
 (0)