Primiano Tucci | 1333134 | 2017-10-25 17:08:13 +0100 | [diff] [blame] | 1 | # Copyright (C) 2017 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://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, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Primiano Tucci | d7d1be0 | 2017-10-30 17:41:34 +0000 | [diff] [blame] | 15 | source_set("base") { |
| 16 | sources = [ |
| 17 | "build_config.h", |
| 18 | "logging.h", |
| 19 | "scoped_file.h", |
| 20 | "task_runner.h", |
Primiano Tucci | 575af77 | 2017-11-08 18:14:17 +0000 | [diff] [blame] | 21 | "thread_checker.cc", |
| 22 | "thread_checker.h", |
Sami Kyostila | 2c6c2f5 | 2017-11-21 16:08:16 +0000 | [diff] [blame] | 23 | "unix_task_runner.cc", |
| 24 | "unix_task_runner.h", |
Primiano Tucci | d7d1be0 | 2017-10-30 17:41:34 +0000 | [diff] [blame] | 25 | "utils.h", |
Primiano Tucci | 575af77 | 2017-11-08 18:14:17 +0000 | [diff] [blame] | 26 | "weak_ptr.h", |
Primiano Tucci | d7d1be0 | 2017-10-30 17:41:34 +0000 | [diff] [blame] | 27 | ] |
Sami Kyostila | 73d41c8 | 2017-11-24 18:38:46 +0000 | [diff] [blame^] | 28 | |
| 29 | if (target_os == "android") { |
| 30 | sources += [ |
| 31 | "android_task_runner.cc", |
| 32 | "android_task_runner.h", |
| 33 | ] |
| 34 | libs = [ "android" ] |
| 35 | } |
Primiano Tucci | d7d1be0 | 2017-10-30 17:41:34 +0000 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | source_set("test_support") { |
| 39 | testonly = true |
| 40 | deps += [ ":base" ] |
| 41 | sources = [ |
| 42 | "test/test_task_runner.cc", |
| 43 | "test/test_task_runner.h", |
| 44 | ] |
| 45 | } |
| 46 | |
Primiano Tucci | 1333134 | 2017-10-25 17:08:13 +0100 | [diff] [blame] | 47 | executable("base_unittests") { |
| 48 | testonly = true |
| 49 | deps += [ |
Primiano Tucci | d7d1be0 | 2017-10-30 17:41:34 +0000 | [diff] [blame] | 50 | ":base", |
| 51 | ":test_support", |
Primiano Tucci | 1333134 | 2017-10-25 17:08:13 +0100 | [diff] [blame] | 52 | "//buildtools:gmock", |
| 53 | "//buildtools:gtest", |
| 54 | "//buildtools:gtest_main", |
| 55 | ] |
| 56 | sources = [ |
Primiano Tucci | d7d1be0 | 2017-10-30 17:41:34 +0000 | [diff] [blame] | 57 | "scoped_file_unittest.cc", |
Sami Kyostila | 73d41c8 | 2017-11-24 18:38:46 +0000 | [diff] [blame^] | 58 | "task_runner_unittest.cc", |
Primiano Tucci | 575af77 | 2017-11-08 18:14:17 +0000 | [diff] [blame] | 59 | "thread_checker_unittest.cc", |
Primiano Tucci | d7d1be0 | 2017-10-30 17:41:34 +0000 | [diff] [blame] | 60 | "utils_unittest.cc", |
Primiano Tucci | 575af77 | 2017-11-08 18:14:17 +0000 | [diff] [blame] | 61 | "weak_ptr_unittest.cc", |
Primiano Tucci | 1333134 | 2017-10-25 17:08:13 +0100 | [diff] [blame] | 62 | ] |
| 63 | } |