Commit 646b9998 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

getdeps show-build-dir

Summary: A show-build-dir subcommand. Possibly useful for building a project and then running only one test or benchmark binary directly.

Reviewed By: wez

Differential Revision: D26502869

fbshipit-source-id: 0d8f6c42a2bbeb2440503a39c7fc770e3b3e4fff
parent cb2d12eb
......@@ -401,6 +401,27 @@ class CleanCmd(SubCmd):
clean_dirs(opts)
@cmd("show-build-dir", "print the build dir for a given project")
class ShowBuildDirCmd(ProjectCmdBase):
def run_project_cmd(self, args, loader, manifest):
if args.recursive:
manifests = loader.manifests_in_dependency_order()
else:
manifests = [manifest]
for m in manifests:
inst_dir = loader.get_project_build_dir(m)
print(inst_dir)
def setup_project_cmd_parser(self, parser):
parser.add_argument(
"--recursive",
help="print the transitive deps also",
action="store_true",
default=False,
)
@cmd("show-inst-dir", "print the installation dir for a given project")
class ShowInstDirCmd(ProjectCmdBase):
def run_project_cmd(self, args, loader, manifest):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment