Commit Graph

5 Commits

Author SHA1 Message Date
Wyatt Hepler
4981058686 Bazel and CMake build updates
- Build pw_log and pw_log_basic in Bazel and CMake.
- Use pw_log_basic as the hard-coded backend in Bazel.
- Give CMake auto added tests access to all of the module's
  dependencies.

Change-Id: I15ebb2958506f120c79ee6057fbef0fdcf090354
2020-01-24 15:10:07 -08:00
Wyatt Hepler
c3a2d475ce Build tweaks for C files
- Use the full file name for object files in the GN build, e.g.
  file.cc.o instead of file.o. This allows having .cc and .c files with
  the same name.
- Have the pw_auto_add_simple_module CMake function build .c and .cc
  test files together.

Change-Id: I3086a96bcc55b013db4f2c278418c17ce1b9fd82
2020-01-09 22:18:49 +00:00
Wyatt Hepler
6afac0a518 CMake: color output; use . as test group separator
- Use . as a separator in the test group target names. For example,
  pw_run_tests_pw_varint is now pw_run_tests.pw_varint.
- Force the compiler to colorize its output.

Change-Id: I47c283974db935ec5f93402de965caab57a9750c
2020-01-08 14:27:07 -08:00
Wyatt Hepler
a6a7cb2bde CMake build: pw_add_test updates; fix C builds
- In pw_add_test, require the name argument and accept a source list.
  This is more consistent with GN and Bazel.
- Make some compile options C++-only.

Change-Id: I5c11bcf5fb35c11fe6c332034c95ca6ad9203429
2020-01-07 16:21:28 -08:00
Wyatt Hepler
0fbcdfc3cd Basic CMake build
- Automatically add simple modules with pw_auto_add_simmple_module.
- Define libraries in a module with pw_add_module_library.
- Define tests and test groups with pw_add_test and
  pw_add_test_to_groups.
- Tests execute with full Ninja dependency resolution, as in the GN
  build.
- Add CMakeLists.txt for existing modules.
- Currently there is no support for targets, but these libraries would
  be trivial to integrate with an existing CMake build.

Change-Id: If73d8b61bce88f91141737eb773f1ebce3a7676e
2020-01-04 01:05:46 +00:00