Dan Willemsen | 19edaf1 | 2016-01-06 17:43:58 -0800 | [diff] [blame] | 1 | // Copyright 2016 Google Inc. All rights reserved |
| 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 | |
Dan Willemsen | 6e63e0f | 2016-10-17 15:33:58 -0700 | [diff] [blame] | 15 | cc_defaults { |
| 16 | name: "ckati_defaults", |
| 17 | cflags: [ |
| 18 | "-W", |
| 19 | "-Wall", |
| 20 | "-Werror", |
| 21 | "-DNOLOG", |
| 22 | ], |
Dan Willemsen | cb2ff85 | 2016-11-01 14:49:08 -0700 | [diff] [blame] | 23 | tidy_checks: [ |
| 24 | "-google-global-names-in-headers", |
| 25 | "-google-build-using-namespace", |
| 26 | "-google-explicit-constructor", |
| 27 | ], |
Dan Willemsen | 6e63e0f | 2016-10-17 15:33:58 -0700 | [diff] [blame] | 28 | } |
| 29 | |
Dan Willemsen | 19edaf1 | 2016-01-06 17:43:58 -0800 | [diff] [blame] | 30 | cc_library_host_static { |
| 31 | name: "libckati", |
Dan Willemsen | 6e63e0f | 2016-10-17 15:33:58 -0700 | [diff] [blame] | 32 | defaults: ["ckati_defaults"], |
Dan Willemsen | 19edaf1 | 2016-01-06 17:43:58 -0800 | [diff] [blame] | 33 | srcs: [ |
Shinichiro Hamaji | 1a444a8 | 2016-02-16 13:49:49 +0900 | [diff] [blame] | 34 | "affinity.cc", |
Dan Willemsen | 19edaf1 | 2016-01-06 17:43:58 -0800 | [diff] [blame] | 35 | "command.cc", |
| 36 | "dep.cc", |
| 37 | "eval.cc", |
| 38 | "exec.cc", |
| 39 | "expr.cc", |
| 40 | "file.cc", |
| 41 | "file_cache.cc", |
| 42 | "fileutil.cc", |
| 43 | "find.cc", |
| 44 | "flags.cc", |
| 45 | "func.cc", |
| 46 | "io.cc", |
| 47 | "log.cc", |
| 48 | "ninja.cc", |
| 49 | "parser.cc", |
Dan Willemsen | a09a79d | 2016-02-03 21:58:23 -0800 | [diff] [blame] | 50 | "regen.cc", |
Dan Willemsen | 19edaf1 | 2016-01-06 17:43:58 -0800 | [diff] [blame] | 51 | "rule.cc", |
| 52 | "stats.cc", |
| 53 | "stmt.cc", |
| 54 | "string_piece.cc", |
| 55 | "stringprintf.cc", |
| 56 | "strutil.cc", |
| 57 | "symtab.cc", |
Dan Willemsen | a09a79d | 2016-02-03 21:58:23 -0800 | [diff] [blame] | 58 | "thread_pool.cc", |
Dan Willemsen | 19edaf1 | 2016-01-06 17:43:58 -0800 | [diff] [blame] | 59 | "timeutil.cc", |
| 60 | "var.cc", |
| 61 | "version_unknown.cc", |
| 62 | ], |
Dan Willemsen | 19edaf1 | 2016-01-06 17:43:58 -0800 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | cc_binary_host { |
| 66 | name: "ckati", |
Dan Willemsen | 6e63e0f | 2016-10-17 15:33:58 -0700 | [diff] [blame] | 67 | defaults: ["ckati_defaults"], |
| 68 | srcs: ["main.cc"], |
Dan Willemsen | 19edaf1 | 2016-01-06 17:43:58 -0800 | [diff] [blame] | 69 | whole_static_libs: ["libckati"], |
Dan Willemsen | 6e63e0f | 2016-10-17 15:33:58 -0700 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | cc_binary_host { |
| 73 | name: "ckati_stamp_dump", |
| 74 | defaults: ["ckati_defaults"], |
| 75 | srcs: ["regen_dump.cc"], |
Dan Willemsen | 3af7e61 | 2016-10-20 21:41:26 -0700 | [diff] [blame] | 76 | static_libs: ["libckati"], |
Dan Willemsen | 19edaf1 | 2016-01-06 17:43:58 -0800 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | cc_test_host { |
| 80 | name: "ckati_test", |
Dan Willemsen | 6e63e0f | 2016-10-17 15:33:58 -0700 | [diff] [blame] | 81 | defaults: ["ckati_defaults"], |
Dan Willemsen | 19edaf1 | 2016-01-06 17:43:58 -0800 | [diff] [blame] | 82 | test_per_src: true, |
| 83 | srcs: [ |
| 84 | "find_test.cc", |
| 85 | "ninja_test.cc", |
| 86 | "string_piece_test.cc", |
Dan Willemsen | a09a79d | 2016-02-03 21:58:23 -0800 | [diff] [blame] | 87 | "strutil_bench.cc", |
Dan Willemsen | 19edaf1 | 2016-01-06 17:43:58 -0800 | [diff] [blame] | 88 | "strutil_test.cc", |
| 89 | ], |
| 90 | gtest: false, |
Dan Willemsen | 3af7e61 | 2016-10-20 21:41:26 -0700 | [diff] [blame] | 91 | static_libs: ["libckati"], |
Dan Willemsen | 19edaf1 | 2016-01-06 17:43:58 -0800 | [diff] [blame] | 92 | } |
Dan Willemsen | 9862c2a | 2016-09-30 19:42:53 -0700 | [diff] [blame] | 93 | |
| 94 | cc_benchmark_host { |
| 95 | name: "ckati_fileutil_bench", |
Dan Willemsen | 6e63e0f | 2016-10-17 15:33:58 -0700 | [diff] [blame] | 96 | defaults: ["ckati_defaults"], |
Dan Willemsen | 9862c2a | 2016-09-30 19:42:53 -0700 | [diff] [blame] | 97 | srcs: [ |
| 98 | "fileutil_bench.cc", |
| 99 | ], |
Dan Willemsen | 3af7e61 | 2016-10-20 21:41:26 -0700 | [diff] [blame] | 100 | static_libs: ["libckati"], |
Dan Willemsen | 9862c2a | 2016-09-30 19:42:53 -0700 | [diff] [blame] | 101 | } |