1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//testing/test.gni")
7 defines = [ "GN_BUILD" ]
9 static_library("gn_lib") {
10 configs += [ "//build/config:precompiled_headers" ]
13 "action_target_generator.cc",
14 "action_target_generator.h",
19 "binary_target_generator.cc",
20 "binary_target_generator.h",
27 "c_include_iterator.cc",
28 "c_include_iterator.h",
45 "config_values_extractors.cc",
46 "config_values_extractors.h",
47 "config_values_generator.cc",
48 "config_values_generator.h",
49 "copy_target_generator.cc",
50 "copy_target_generator.h",
59 "filesystem_utils.cc",
61 "function_exec_script.cc",
62 "function_foreach.cc",
63 "function_get_label_info.cc",
64 "function_get_path_info.cc",
65 "function_get_target_outputs.cc",
66 "function_process_file_template.cc",
67 "function_read_file.cc",
68 "function_rebase_path.cc",
69 "function_set_default_toolchain.cc",
70 "function_set_defaults.cc",
71 "function_template.cc",
72 "function_toolchain.cc",
73 "function_write_file.cc",
76 "functions_target.cc",
77 "group_target_generator.cc",
78 "group_target_generator.h",
83 "inherited_libraries.cc",
84 "inherited_libraries.h",
85 "input_conversion.cc",
89 "input_file_manager.cc",
90 "input_file_manager.h",
102 "ninja_action_target_writer.cc",
103 "ninja_action_target_writer.h",
104 "ninja_binary_target_writer.cc",
105 "ninja_binary_target_writer.h",
106 "ninja_build_writer.cc",
107 "ninja_build_writer.h",
108 "ninja_copy_target_writer.cc",
109 "ninja_copy_target_writer.h",
110 "ninja_group_target_writer.cc",
111 "ninja_group_target_writer.h",
112 "ninja_target_writer.cc",
113 "ninja_target_writer.h",
114 "ninja_toolchain_writer.cc",
115 "ninja_toolchain_writer.h",
138 "scope_per_file_provider.cc",
139 "scope_per_file_provider.h",
148 "source_file_type.cc",
149 "source_file_type.h",
154 "substitution_list.cc",
155 "substitution_list.h",
156 "substitution_pattern.cc",
157 "substitution_pattern.h",
158 "substitution_type.cc",
159 "substitution_type.h",
160 "substitution_writer.cc",
161 "substitution_writer.h",
166 "target_generator.cc",
167 "target_generator.h",
183 "value_extractors.cc",
184 "value_extractors.h",
193 "//base/third_party/dynamic_annotations",
197 action("last_commit_position") {
198 script = "last_commit_position.py"
200 # This dependency forces a re-run when the code is synced.
202 "//build/util/LASTCHANGE",
205 outfile = "$target_gen_dir/last_commit_position.h"
211 rebase_path("//", root_build_dir),
212 rebase_path(outfile, root_build_dir),
213 "TOOLS_GN_LAST_COMMIT_POSITION_H_",
224 ":last_commit_position",
229 test("gn_unittests") {
231 "action_target_generator_unittest.cc",
233 "builder_unittest.cc",
234 "c_include_iterator_unittest.cc",
235 "command_format_unittest.cc",
236 "config_values_extractors_unittest.cc",
237 "escape_unittest.cc",
238 "exec_process_unittest.cc",
239 "filesystem_utils_unittest.cc",
240 "function_foreach_unittest.cc",
241 "function_get_label_info_unittest.cc",
242 "function_get_path_info_unittest.cc",
243 "function_get_target_outputs_unittest.cc",
244 "function_process_file_template_unittest.cc",
245 "function_rebase_path_unittest.cc",
246 "function_write_file_unittest.cc",
247 "functions_target_unittest.cc",
248 "functions_unittest.cc",
249 "header_checker_unittest.cc",
250 "inherited_libraries_unittest.cc",
251 "input_conversion_unittest.cc",
252 "label_pattern_unittest.cc",
254 "loader_unittest.cc",
255 "ninja_action_target_writer_unittest.cc",
256 "ninja_binary_target_writer_unittest.cc",
257 "ninja_copy_target_writer_unittest.cc",
258 "ninja_group_target_writer_unittest.cc",
259 "ninja_target_writer_unittest.cc",
260 "ninja_toolchain_writer_unittest.cc",
261 "operators_unittest.cc",
262 "parse_tree_unittest.cc",
263 "parser_unittest.cc",
264 "path_output_unittest.cc",
265 "pattern_unittest.cc",
266 "runtime_deps_unittest.cc",
267 "scope_per_file_provider_unittest.cc",
269 "source_dir_unittest.cc",
270 "source_file_unittest.cc",
271 "string_utils_unittest.cc",
272 "substitution_pattern_unittest.cc",
273 "substitution_writer_unittest.cc",
274 "target_generator_unittest.cc",
275 "target_unittest.cc",
276 "template_unittest.cc",
277 "test_with_scope.cc",
279 "tokenizer_unittest.cc",
280 "unique_vector_unittest.cc",
282 "visibility_unittest.cc",
286 "//base/test:run_all_unittests",
287 "//base/test:test_support",
292 executable("generate_test_gn_data") {
294 "generate_test_gn_data.cc",