Commit Graph

9 Commits

Author SHA1 Message Date
Wyatt Hepler
38b6d44589 pw_preprocessor: Macros for disabling warnings
Change-Id: I00e9b00d93b46fa7a30e2cb7e6b83e5a81310585
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/40460
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
2021-04-12 17:37:07 +00:00
Wyatt Hepler
eb3304c276 pw_preprocessor: Rename macro_arg_count.h
- Rename macro_arg_count.h to arguments.h
- Have macro_arg_count.h #include the renamed header for compatibility.

Change-Id: I781a457af88c6dd63ab8f8394bfe45cff9bc71e9
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/17500
Reviewed-by: Alexei Frolov <frolv@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
2020-09-08 17:45:35 +00:00
Wyatt Hepler
880cd686ae pw_preprocessor: Improve macro arg handling
- Add PW_LAST_ARG, PW_DROP_LAST_ARG, and PW_DROP_LAST_ARG_IF_EMPTY.
- Reimplement PW_COMMA_ARGS and PW_DELEGATE_BY_ARG_COUNT in terms of
  these new macros. This makes macros built with these more robust.
- Add a test for PW_COMMA_ARGS that demonstrates why it should not be
  used when invoking a function-like macro.

Change-Id: I862f70623d53fdd7eee1440f91161981e12ce892
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/16283
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Keir Mierle <keir@google.com>
2020-08-19 19:20:37 +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
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
Rob Mohr
c2787500d5 Move loads to beginning of BUILD files.
Change-Id: Idb918a48cfe6149f624295f6712fbf0a3a36a7ff
2019-11-19 18:20:03 +00: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
e8fbe6a882 Add license metadata to bazel files.
Change-Id: Id32c7db700f3fba809d4e90473cbd3e8b8d7ca47
2019-11-15 11:52:14 -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