Skip to content

Commit 8a20d32

Browse files
committed
Extract power_btn from //cuttlefish/host/commands/cvd/cli/commands:leaf_commands
https://bazel.build/docs/bazel-and-cpp
1 parent 71ddc2d commit 8a20d32

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

base/cvd/cuttlefish/host/commands/cvd/cli/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ cc_library(
102102
"//cuttlefish/host/commands/cvd/cli/commands:lint",
103103
"//cuttlefish/host/commands/cvd/cli/commands:login",
104104
"//cuttlefish/host/commands/cvd/cli/commands:noop",
105+
"//cuttlefish/host/commands/cvd/cli/commands:power_btn",
105106
"//cuttlefish/host/commands/cvd/cli/parser",
106107
"//cuttlefish/host/commands/cvd/cli/selector:parser",
107108
"//cuttlefish/host/commands/cvd/cli:types",

base/cvd/cuttlefish/host/commands/cvd/cli/commands/BUILD.bazel

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,31 @@ clang_tidy_test(
322322
tags = ["clang_tidy", "clang-tidy"],
323323
)
324324

325+
cc_library(
326+
name = "power_btn",
327+
srcs = ["power_btn.cpp"],
328+
hdrs = ["power_btn.h"],
329+
deps = [
330+
"//cuttlefish/host/commands/cvd/cli/commands:command_handler",
331+
"//cuttlefish/host/commands/cvd/cli/selector",
332+
"//cuttlefish/host/commands/cvd/instances",
333+
"//cuttlefish/common/libs/utils:result",
334+
"//cuttlefish/host/commands/cvd/cli:types",
335+
"//libbase",
336+
"@fmt",
337+
],
338+
)
339+
340+
clang_tidy_test(
341+
name = "power_btn_clang_tidy",
342+
srcs = [":power_btn"],
343+
tags = ["clang_tidy", "clang-tidy"],
344+
)
345+
325346
# Leaf commands: commands that don't execute other commands
326347
cc_library(
327348
name = "leaf_commands",
328349
srcs = [
329-
"power_btn.cpp",
330350
"powerwash.cpp",
331351
"remove.cpp",
332352
"reset.cpp",
@@ -340,7 +360,6 @@ cc_library(
340360
"version.cpp",
341361
],
342362
hdrs = [
343-
"power_btn.h",
344363
"powerwash.h",
345364
"remove.h",
346365
"reset.h",

0 commit comments

Comments
 (0)