pw_result: Extend CMake support
Change-Id: I7ffaca28751e7f12b817178abac25f42bafe378d
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/79470
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/pw_result/CMakeLists.txt b/pw_result/CMakeLists.txt
index 9e11025..300d12b 100644
--- a/pw_result/CMakeLists.txt
+++ b/pw_result/CMakeLists.txt
@@ -14,12 +14,27 @@
include($ENV{PW_ROOT}/pw_build/pigweed.cmake)
-pw_auto_add_simple_module(pw_result
+pw_add_module_library(pw_result
+ HEADERS
+ public/pw_result/result.h
+ PUBLIC_INCLUDES
+ public
PUBLIC_DEPS
pw_assert
pw_status
+ pw_preprocessor
)
-
if(Zephyr_FOUND AND CONFIG_PIGWEED_RESULT)
zephyr_link_libraries(pw_result)
endif()
+
+pw_add_test(pw_result.result_test
+ SOURCES
+ result_test.cc
+ DEPS
+ pw_result
+ pw_status
+ GROUPS
+ modules
+ pw_result
+)