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 #ifndef TOOLS_GN_CONFIG_VALUES_H_ | 5 #ifndef TOOLS_GN_CONFIG_VALUES_H_ |
6 #define TOOLS_GN_CONFIG_VALUES_H_ | 6 #define TOOLS_GN_CONFIG_VALUES_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 // Appends the values from the given config to this one. | 23 // Appends the values from the given config to this one. |
24 void AppendValues(const ConfigValues& append); | 24 void AppendValues(const ConfigValues& append); |
25 | 25 |
26 #define STRING_VALUES_ACCESSOR(name) \ | 26 #define STRING_VALUES_ACCESSOR(name) \ |
27 const std::vector<std::string>& name() const { return name##_; } \ | 27 const std::vector<std::string>& name() const { return name##_; } \ |
28 std::vector<std::string>& name() { return name##_; } | 28 std::vector<std::string>& name() { return name##_; } |
29 #define DIR_VALUES_ACCESSOR(name) \ | 29 #define DIR_VALUES_ACCESSOR(name) \ |
30 const std::vector<SourceDir>& name() const { return name##_; } \ | 30 const std::vector<SourceDir>& name() const { return name##_; } \ |
31 std::vector<SourceDir>& name() { return name##_; } | 31 std::vector<SourceDir>& name() { return name##_; } |
32 | 32 |
33 // ================================================================== | 33 // ================================================================= |
34 // IMPORTANT: If you add a new one, be sure to update AppendValues(). | 34 // IMPORTANT: If you add a new one, be sure to update AppendValues() |
35 // ================================================================== | 35 // and command_desc.cc. |
| 36 // ================================================================= |
36 STRING_VALUES_ACCESSOR(arflags) | 37 STRING_VALUES_ACCESSOR(arflags) |
37 STRING_VALUES_ACCESSOR(asmflags) | 38 STRING_VALUES_ACCESSOR(asmflags) |
38 STRING_VALUES_ACCESSOR(cflags) | 39 STRING_VALUES_ACCESSOR(cflags) |
39 STRING_VALUES_ACCESSOR(cflags_c) | 40 STRING_VALUES_ACCESSOR(cflags_c) |
40 STRING_VALUES_ACCESSOR(cflags_cc) | 41 STRING_VALUES_ACCESSOR(cflags_cc) |
41 STRING_VALUES_ACCESSOR(cflags_objc) | 42 STRING_VALUES_ACCESSOR(cflags_objc) |
42 STRING_VALUES_ACCESSOR(cflags_objcc) | 43 STRING_VALUES_ACCESSOR(cflags_objcc) |
43 STRING_VALUES_ACCESSOR(defines) | 44 STRING_VALUES_ACCESSOR(defines) |
44 DIR_VALUES_ACCESSOR (include_dirs) | 45 DIR_VALUES_ACCESSOR (include_dirs) |
45 STRING_VALUES_ACCESSOR(ldflags) | 46 STRING_VALUES_ACCESSOR(ldflags) |
46 DIR_VALUES_ACCESSOR (lib_dirs) | 47 DIR_VALUES_ACCESSOR (lib_dirs) |
47 // ================================================================== | 48 // ================================================================= |
48 // IMPORTANT: If you add a new one, be sure to update AppendValues(). | 49 // IMPORTANT: If you add a new one, be sure to update AppendValues() |
49 // ================================================================== | 50 // and command_desc.cc. |
| 51 // ================================================================= |
50 | 52 |
51 #undef STRING_VALUES_ACCESSOR | 53 #undef STRING_VALUES_ACCESSOR |
52 #undef DIR_VALUES_ACCESSOR | 54 #undef DIR_VALUES_ACCESSOR |
53 | 55 |
54 const std::vector<LibFile>& libs() const { return libs_; } | 56 const std::vector<LibFile>& libs() const { return libs_; } |
55 std::vector<LibFile>& libs() { return libs_; } | 57 std::vector<LibFile>& libs() { return libs_; } |
56 | 58 |
57 bool has_precompiled_headers() const { | 59 bool has_precompiled_headers() const { |
58 return !precompiled_header_.empty() || !precompiled_source_.is_null(); | 60 return !precompiled_header_.empty() || !precompiled_source_.is_null(); |
59 } | 61 } |
(...skipping 23 matching lines...) Expand all Loading... |
83 std::vector<std::string> ldflags_; | 85 std::vector<std::string> ldflags_; |
84 std::vector<SourceDir> lib_dirs_; | 86 std::vector<SourceDir> lib_dirs_; |
85 std::vector<LibFile> libs_; | 87 std::vector<LibFile> libs_; |
86 // If you add a new one, be sure to update AppendValues(). | 88 // If you add a new one, be sure to update AppendValues(). |
87 | 89 |
88 std::string precompiled_header_; | 90 std::string precompiled_header_; |
89 SourceFile precompiled_source_; | 91 SourceFile precompiled_source_; |
90 }; | 92 }; |
91 | 93 |
92 #endif // TOOLS_GN_CONFIG_VALUES_H_ | 94 #endif // TOOLS_GN_CONFIG_VALUES_H_ |
OLD | NEW |