blob: 5adaebead857252d9f7a9e3bfa1bb1eeb96dddf7 [file] [log] [blame]
Wyatt Hepler0fbcdfc2020-01-02 07:53:39 -08001# Copyright 2020 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
Wyatt Hepler0a6f7632020-10-29 09:08:19 -070015include($ENV{PW_ROOT}/pw_build/pigweed.cmake)
16
Ewout van Bekkumc67146e2021-12-20 13:15:45 -080017pw_add_module_config(pw_unit_test_CONFIG)
18
19pw_add_module_library(pw_unit_test.config
20 PUBLIC_DEPS
21 ${pw_unit_test_CONFIG}
22 pw_polyfill
23 HEADERS
24 public/pw_unit_test/config.h
25)
26
Wyatt Hepler0fbcdfc2020-01-02 07:53:39 -080027pw_add_module_library(pw_unit_test
28 SOURCES
29 framework.cc
30 PUBLIC_DEPS
Wyatt Heplera55d4c72020-01-16 10:26:04 -080031 pw_polyfill
Wyatt Hepler0fbcdfc2020-01-02 07:53:39 -080032 pw_preprocessor
33 pw_string
Ewout van Bekkumc67146e2021-12-20 13:15:45 -080034 pw_unit_test.config
Wyatt Hepler0fbcdfc2020-01-02 07:53:39 -080035)
36
37# pw_unit_test overrides the gtest/gtest.h header.
38target_include_directories(pw_unit_test PUBLIC public_overrides)
39
40pw_add_module_library(pw_unit_test.main
41 SOURCES
Keir Mierleda0bccb2020-01-17 13:51:35 -080042 simple_printing_main.cc
Wyatt Hepler0fbcdfc2020-01-02 07:53:39 -080043 simple_printing_event_handler.cc
44 PUBLIC_DEPS
45 pw_unit_test
46 PRIVATE_DEPS
47 pw_preprocessor
Wyatt Hepler0fbcdfc2020-01-02 07:53:39 -080048 pw_string
Armando Montanezf7a5a742020-03-02 14:58:59 -080049 pw_sys_io
Wyatt Hepler0fbcdfc2020-01-02 07:53:39 -080050)