| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "tools/gn/setup.h" | 5 #include "tools/gn/setup.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 buildfile, but with very limited build setup-specific meaning. | 51 buildfile, but with very limited build setup-specific meaning. |
| 52 | 52 |
| 53 If you specify --root, by default GN will look for the file .gn in that | 53 If you specify --root, by default GN will look for the file .gn in that |
| 54 directory. If you want to specify a different file, you can additionally pass | 54 directory. If you want to specify a different file, you can additionally pass |
| 55 --dotfile: | 55 --dotfile: |
| 56 | 56 |
| 57 gn gen out/Debug --root=/home/build --dotfile=/home/my_gn_file.gn | 57 gn gen out/Debug --root=/home/build --dotfile=/home/my_gn_file.gn |
| 58 | 58 |
| 59 Variables | 59 Variables |
| 60 | 60 |
| 61 arg_file_template [optional] |
| 62 Path to a file containing the text that should be used as the default |
| 63 args.gn content when you run `gn args`. |
| 64 |
| 61 buildconfig [required] | 65 buildconfig [required] |
| 62 Label of the build config file. This file will be used to set up the | 66 Path to the build config file. This file will be used to set up the |
| 63 build file execution environment for each toolchain. | 67 build file execution environment for each toolchain. |
| 64 | 68 |
| 65 check_targets [optional] | 69 check_targets [optional] |
| 66 A list of labels and label patterns that should be checked when running | 70 A list of labels and label patterns that should be checked when running |
| 67 "gn check" or "gn gen --check". If unspecified, all targets will be | 71 "gn check" or "gn gen --check". If unspecified, all targets will be |
| 68 checked. If it is the empty list, no targets will be checked. | 72 checked. If it is the empty list, no targets will be checked. |
| 69 | 73 |
| 70 The format of this list is identical to that of "visibility" so see "gn | 74 The format of this list is identical to that of "visibility" so see "gn |
| 71 help visibility" for examples. | 75 help visibility" for examples. |
| 72 | 76 |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 dotfile_scope_.GetValue("default_args", true); | 787 dotfile_scope_.GetValue("default_args", true); |
| 784 if (default_args_value) { | 788 if (default_args_value) { |
| 785 if (!default_args_value->VerifyTypeIs(Value::SCOPE, &err)) { | 789 if (!default_args_value->VerifyTypeIs(Value::SCOPE, &err)) { |
| 786 err.PrintToStdout(); | 790 err.PrintToStdout(); |
| 787 return false; | 791 return false; |
| 788 } | 792 } |
| 789 | 793 |
| 790 default_args_ = default_args_value->scope_value(); | 794 default_args_ = default_args_value->scope_value(); |
| 791 } | 795 } |
| 792 | 796 |
| 797 const Value* arg_file_template_value = |
| 798 dotfile_scope_.GetValue("arg_file_template", true); |
| 799 if (arg_file_template_value) { |
| 800 if (!arg_file_template_value->VerifyTypeIs(Value::STRING, &err)) { |
| 801 err.PrintToStdout(); |
| 802 return false; |
| 803 } |
| 804 SourceFile path(arg_file_template_value->string_value()); |
| 805 build_settings_.set_arg_file_template_path(path); |
| 806 } |
| 807 |
| 793 return true; | 808 return true; |
| 794 } | 809 } |
| OLD | NEW |