Commit Graph

18 Commits

Author SHA1 Message Date
Rob Mohr
f6fe134bb0 pw_build: add options for building with Kythe
When building with Kythe add required options to get build to pass.

Change-Id: I5a4183e986e4869c5f65bbba2ca9c6b737ee06bf
Bug: 174
2020-04-14 14:16:15 +00:00
Rob Mohr
068194895a Many changes to support stricter deps
* Split pw_assert targets as in pwrev/9000.
* Add many missing dependencies (mostly on //pw_unit_test)
* Added visibility and licenses to pw_minimal_cpp_stdlib/BUILD
* Used explicit template params in pw_result/result_test.cc
* Added missing #include of pw_kvs/pw_kvs_private/macros.h

Change-Id: I9bdc875b585e47792ca926f7c75cfe055b02fa48
Bug: 101
2020-04-07 00:04:46 +00:00
Wyatt Hepler
a16ac8a0d0 Add -g to CMake and Bazel builds
Change-Id: Ib7f5b3b0497f5450f1c891c1306efccd22d87929
2020-01-29 23:53:02 +00:00
Wyatt Hepler
7d1deb1b9d Bazel: compile C files separately from C++
Some Pigweed compilation options do not work for C files, and Bazel
doesn't provide a way to split C and C++ compmile options at the
cc_library level. This change updates the pw build rules to build C
code, if any, in a separate cc_library that the C++ library depends on.

Change-Id: I7c1b3c95665a382e35c69f3ec57d4a1cca8abe2d
2020-01-07 16:32:44 +00:00
Wyatt Hepler
61def0a64a Bazel: Move include paths to libraries
Instead of having a global list of -I include paths, have each library
provide a -I for the public/ directory using the includes argument.

Change-Id: I2e321752906920cd94beaaab97b8796af85078e4
2020-01-06 18:41:23 +00:00
Alexei Frolov
bbf164c985 Add pw_protobuf module
This change adds a pw_protobuf module containing a lightweight protobuf
wire format encoder. The encoder comes with a Python script that plugs
into protoc to generate C++ classes from Protobuf files that wrap its
functionality.

Bug: 20

Change-Id: I867655ab64c2f6ddd2a731054b1fbe7ccc97ba70
2019-12-18 21:29:17 +00:00
Alexei Frolov
802c6e4248 pw_unit_test: Move gtest.h into public_overrides/
This change moves the gtest/gtest.h header override provided by
pw_unit_test into public_overrides/ to conform the Pigweed's module
structure.

Change-Id: Ie6c30e8db3acbe948c99b18e6843dba6d58e7cdc
2019-12-18 01:55:32 +00:00
Rob Mohr
05b0b11d42 Change precedence of options in bazel.
Now options specified in BUILD files can override defaults.

Change-Id: I88586805b2f4dffd18d3920efbede906f670cdf0
2019-12-04 17:13:50 +00:00
Rob Mohr
3895a127c7 Fix bazel build.
pw_string/util_test.cc was not tested and pw_varint had no BUILD file.

Change-Id: Ibaf5c05d3876b6cef5eb1fc70f644f03468bca2b
2019-12-02 21:44:15 +00:00
Rob Mohr
ea9a66b357 Fix bazel build.
Change-Id: Ib8cc984d27fa75b63796c910562e5d3f52416234
2019-11-26 22:10:45 +00:00
Rob Mohr
af7bd883d8 Add docstring to pigweed.bzl.
Change-Id: I1b7783f71b0e98fcb3e36e0fcd1724d64d407213
2019-11-19 18:19:41 +00:00
Rob Mohr
57211c25ff Add pw_dumb_io to bazel build.
Change-Id: I2ebc9f7e850195740e71a05ec97ab38e452781ce
2019-11-19 05:11:32 +00:00
Rob Mohr
e6cbdf8a9b Add -Wnon-virtual-dtor.
This has come up a couple times already, and when I import this
internally I get errors.

https://pigweed-review.git.corp.google.com/c/pigweed/pigweed/+/1900
https://pigweed-review.git.corp.google.com/c/pigweed/pigweed/+/2000

Change-Id: I96444edba75b7bbefdeb9d3718117a6dafa77bfb
2019-11-18 14:37:48 -08:00
Rob Mohr
df2b13b72d Add -use_header_modules.
This is for compatibility when migrating to other repositories.

Change-Id: I442b3d0a767c86a93427aed753a410262166df98
2019-11-18 14:04:25 -08:00
Rob Mohr
c70366e906 Simplify bazel build.
Use variables instead of functions, and add wrappers for builtins.

Change-Id: If6e75efe35ce2fe754f2ed7421497bc1f5d47507
2019-11-18 11:24:53 -08:00
Rob Mohr
afe23d96c3 Minor formatting change in pigweed.bzl.
This will be easier to deal with in code migrations.

Change-Id: Id3d62e3dbdce666c05547d298f82ef07f8724054
2019-11-15 23:34:26 +00:00
Rob Mohr
75e5fc9a15 Add pw_string to bazel build.
Change-Id: I0aa7741959b741de082d44afe87786754b572951
2019-11-14 09:16:03 -08:00
Rob Mohr
be98ead12a Add bazel build system files.
Build everything with 'bazel build //...' and run all tests with
'bazel test //...'.

Change-Id: Ia912e999e33caa9b490002d639dc4c9a80034afc
2019-11-14 07:16:44 -08:00