Skip to content

Commit

Permalink
pw_system: Add missing host cmake build deps
Browse files Browse the repository at this point in the history
Change-Id: Id93c67b4685065cd3b1f7827e353a5999b225c7a
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/231812
Lint: Lint 🤖 <[email protected]>
Reviewed-by: Wyatt Hepler <[email protected]>
Reviewed-by: Taylor Cramer <[email protected]>
Pigweed-Auto-Submit: Anthony DiGirolamo <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
  • Loading branch information
AnthonyDiGirolamo authored and CQ Bot Account committed Sep 5, 2024
1 parent 9ee719d commit bce3cdb
Show file tree
Hide file tree
Showing 17 changed files with 614 additions and 45 deletions.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ add_subdirectory(pw_async EXCLUDE_FROM_ALL)
add_subdirectory(pw_async_basic EXCLUDE_FROM_ALL)
add_subdirectory(pw_async2 EXCLUDE_FROM_ALL)
add_subdirectory(pw_async2_basic EXCLUDE_FROM_ALL)
add_subdirectory(pw_async2_epoll EXCLUDE_FROM_ALL)
add_subdirectory(pw_async_fuchsia EXCLUDE_FROM_ALL)
add_subdirectory(pw_base64 EXCLUDE_FROM_ALL)
add_subdirectory(pw_blob_store EXCLUDE_FROM_ALL)
Expand Down Expand Up @@ -175,6 +176,13 @@ add_subdirectory(third_party/fuzztest EXCLUDE_FROM_ALL)
add_subdirectory(third_party/googletest EXCLUDE_FROM_ALL)
add_subdirectory(third_party/boringssl EXCLUDE_FROM_ALL)

add_custom_target(pw_apps)

# pw_system example apps
add_subdirectory(targets/host_device_simulator EXCLUDE_FROM_ALL)
add_dependencies(pw_apps pw_system.system_example)
add_dependencies(pw_apps pw_system.system_async_host_example)

if(CONFIG_ZEPHYR_PIGWEED_MODULE)
add_subdirectory(zephyr)
if(CONFIG_PIGWEED_MINIMAL_CPP_STDLIB)
Expand All @@ -184,6 +192,5 @@ if(CONFIG_ZEPHYR_PIGWEED_MODULE)
else()
add_subdirectory(targets/host EXCLUDE_FROM_ALL)

add_custom_target(pw_apps)
add_dependencies(pw_apps pw_hdlc.rpc_example)
endif()
2 changes: 1 addition & 1 deletion pw_async2_epoll/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

include($ENV{PW_ROOT}/pw_build/pigweed.cmake)

pw_add_library(pw_async2_basic.dispatcher_backend STATIC
pw_add_library(pw_async2_epoll.dispatcher_backend STATIC
HEADERS
public_overrides/pw_async2/dispatcher_native.h
SOURCES
Expand Down
7 changes: 6 additions & 1 deletion pw_channel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
include($ENV{PW_ROOT}/pw_build/pigweed.cmake)
include($ENV{PW_ROOT}/pw_async2/backend.cmake)

pw_add_library(pw_channel INTERFACE
pw_add_library(pw_channel STATIC
HEADERS
public/pw_channel/channel.h
PUBLIC_DEPS
Expand All @@ -31,6 +31,8 @@ pw_add_library(pw_channel INTERFACE
pw_toolchain._sibling_cast
PUBLIC_INCLUDES
public
SOURCES
public/pw_channel/internal/channel_specializations.h
)

pw_add_test(pw_channel.channel_test
Expand Down Expand Up @@ -95,8 +97,11 @@ pw_add_library(pw_channel.epoll_channel STATIC
PUBLIC_DEPS
pw_channel
pw_multibuf.allocator
pw_sync.mutex
PUBLIC_INCLUDES
public
PRIVATE_DEPS
pw_log
)

pw_add_test(pw_channel.epoll_channel_test
Expand Down
28 changes: 23 additions & 5 deletions pw_file/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,22 @@
include($ENV{PW_ROOT}/pw_build/pigweed.cmake)
include($ENV{PW_ROOT}/pw_protobuf_compiler/proto.cmake)

pw_add_library(pw_file.flat_file_system INTERFACE
pw_add_library(pw_file.flat_file_system STATIC
HEADERS
public/pw_file/flat_file_system.h
PUBLIC_INCLUDES
public
PUBLIC_DEPS
pw_file.proto.pwpb
pw_file.proto.raw_rpc
pw_assert
pw_bytes
pw_file.proto.pwpb
pw_file.proto.raw_rpc
pw_log
pw_result
pw_span
pw_status
PRIVATE_DEPS
pw_rpc.test_utils
SOURCES
flat_file_system.cc
)

pw_proto_library(pw_file.proto
Expand All @@ -38,3 +41,18 @@ pw_proto_library(pw_file.proto
PREFIX
pw_file
)

pw_add_test(pw_file.flat_file_system_test
SOURCES
flat_file_system_test.cc
PRIVATE_DEPS
pw_bytes
pw_file.flat_file_system
pw_file.proto.pwpb
pw_protobuf
pw_rpc.raw.test_method_context
pw_status
GROUPS
modules
pw_file
)
1 change: 1 addition & 0 deletions pw_sensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ pw_add_library(pw_sensor INTERFACE
pw_tokenizer
)

# This test does not run on CMake due to missing pw_sensor_library function.
pw_add_test(pw_sensor.constants_test
SOURCES
attributes_test.cc
Expand Down
Loading

0 comments on commit bce3cdb

Please sign in to comment.