Add pw_string to bazel build.
Change-Id: I0aa7741959b741de082d44afe87786754b572951
diff --git a/BUILD b/BUILD
index 3c6b7b3..7279bbb 100644
--- a/BUILD
+++ b/BUILD
@@ -17,5 +17,6 @@
"pw_preprocessor",
"pw_span",
"pw_status",
+ "pw_string",
"pw_unit_test",
]
diff --git a/pw_build/pigweed.bzl b/pw_build/pigweed.bzl
index 154bd9c..0886b5c 100644
--- a/pw_build/pigweed.bzl
+++ b/pw_build/pigweed.bzl
@@ -47,6 +47,7 @@
"pw_preprocessor/public",
"pw_span/public",
"pw_status/public",
+ "pw_string/public",
"pw_unit_test/public",
]
return ["-I" + x for x in includes]
diff --git a/pw_span/BUILD b/pw_span/BUILD
index ccb781d..690f03c 100644
--- a/pw_span/BUILD
+++ b/pw_span/BUILD
@@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations under
# the License.
+package(default_visibility = ["//visibility:public"])
+
load(
"//pw_build:pigweed.bzl",
"pw_default_copts",
diff --git a/pw_status/BUILD b/pw_status/BUILD
index 24f3b2e..31fa5de 100644
--- a/pw_status/BUILD
+++ b/pw_status/BUILD
@@ -19,7 +19,10 @@
cc_library(
name = "pw_status",
srcs = ["status.cc"],
- hdrs = ["public/pw_status/status.h"],
+ hdrs = [
+ "public/pw_status/status.h",
+ "public/pw_status/status_with_size.h",
+ ],
copts = pw_default_copts(),
linkopts = pw_default_linkopts(),
)
diff --git a/pw_string/BUILD b/pw_string/BUILD
new file mode 100644
index 0000000..1f63d4c
--- /dev/null
+++ b/pw_string/BUILD
@@ -0,0 +1,43 @@
+# Copyright 2019 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+package(default_visibility = ["//visibility:public"])
+
+load(
+ "//pw_build:pigweed.bzl",
+ "pw_default_copts",
+ "pw_default_linkopts",
+ "pw_test",
+)
+
+cc_library(
+ name = "pw_string",
+ srcs = ["type_to_string.cc"],
+ hdrs = ["public/pw_string/type_to_string.h"],
+ copts = pw_default_copts(),
+ linkopts = pw_default_linkopts(),
+ deps = [
+ "//pw_preprocessor",
+ "//pw_span",
+ "//pw_status",
+ ],
+)
+
+pw_test(
+ name = "type_to_string_test",
+ srcs = ["type_to_string_test.cc"],
+ copts = pw_default_copts(),
+ linkopts = pw_default_linkopts(),
+ deps = ["//pw_string"],
+)