Skip to content

Commit

Permalink
Move main.cpp to bcc/
Browse files Browse the repository at this point in the history
  • Loading branch information
kiron1 committed Aug 18, 2023
1 parent a013ad5 commit fa75946
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
14 changes: 1 addition & 13 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@ load("@//bazel:pkg_info.bzl", "pkg_variables", "pkg_version")

package(default_visibility = ["//visibility:public"])

cc_binary(
name = "bazel-compile-commands",
srcs = ["main.cpp"],
deps = [
"//bcc:bazel",
"//bcc:compile_commands",
"//bcc:options",
"//bcc:platform",
"//bcc:replacements",
],
)

pandoc(
name = "man",
out = "bazel-compile-commands.1",
Expand All @@ -28,7 +16,7 @@ pandoc(

pkg_tar(
name = "bin.tar",
srcs = [":bazel-compile-commands"],
srcs = ["//bcc:bazel-compile-commands"],
mode = "0755",
package_dir = "bin",
)
Expand Down
12 changes: 12 additions & 0 deletions bcc/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
package(default_visibility = ["//visibility:public"])

cc_binary(
name = "bazel-compile-commands",
srcs = ["main.cpp"],
deps = [
":bazel",
":compile_commands",
":options",
":platform",
":replacements",
],
)

cc_proto_library(
name = "analysis",
deps = ["@io_bazel//src/main/protobuf:analysis_v2_proto"],
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cc_test(
srcs = ["self_test.cpp"],
data = [
":bazel-mock",
"//:bazel-compile-commands",
"//bcc:bazel-compile-commands",
],
deps = [
"@bazel_tools//tools/cpp/runfiles",
Expand Down
2 changes: 1 addition & 1 deletion tests/self_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ TEST(self_test, run)
std::unique_ptr<Runfiles> runfiles(Runfiles::CreateForTest(&error));
ASSERT_THAT(runfiles, NotNull()) << error;

const auto bcc_path = runfiles->Rlocation("bazel-compile-commands/bazel-compile-commands");
const auto bcc_path = runfiles->Rlocation("bazel-compile-commands/bcc/bazel-compile-commands");
ASSERT_THAT(bcc_path, Not(IsEmpty())) << bcc_path;
ASSERT_THAT(boost::filesystem::exists(bcc_path), IsTrue()) << bcc_path;

Expand Down

0 comments on commit fa75946

Please sign in to comment.