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 11 matching lines...) Expand all Loading... |
22 // Appends the values from the given config to this one. | 22 // Appends the values from the given config to this one. |
23 void AppendValues(const ConfigValues& append); | 23 void AppendValues(const ConfigValues& append); |
24 | 24 |
25 #define STRING_VALUES_ACCESSOR(name) \ | 25 #define STRING_VALUES_ACCESSOR(name) \ |
26 const std::vector<std::string>& name() const { return name##_; } \ | 26 const std::vector<std::string>& name() const { return name##_; } \ |
27 std::vector<std::string>& name() { return name##_; } | 27 std::vector<std::string>& name() { return name##_; } |
28 #define DIR_VALUES_ACCESSOR(name) \ | 28 #define DIR_VALUES_ACCESSOR(name) \ |
29 const std::vector<SourceDir>& name() const { return name##_; } \ | 29 const std::vector<SourceDir>& name() const { return name##_; } \ |
30 std::vector<SourceDir>& name() { return name##_; } | 30 std::vector<SourceDir>& name() { return name##_; } |
31 | 31 |
| 32 STRING_VALUES_ACCESSOR(asmflags) |
32 STRING_VALUES_ACCESSOR(cflags) | 33 STRING_VALUES_ACCESSOR(cflags) |
33 STRING_VALUES_ACCESSOR(cflags_c) | 34 STRING_VALUES_ACCESSOR(cflags_c) |
34 STRING_VALUES_ACCESSOR(cflags_cc) | 35 STRING_VALUES_ACCESSOR(cflags_cc) |
35 STRING_VALUES_ACCESSOR(cflags_objc) | 36 STRING_VALUES_ACCESSOR(cflags_objc) |
36 STRING_VALUES_ACCESSOR(cflags_objcc) | 37 STRING_VALUES_ACCESSOR(cflags_objcc) |
37 STRING_VALUES_ACCESSOR(defines) | 38 STRING_VALUES_ACCESSOR(defines) |
38 DIR_VALUES_ACCESSOR (include_dirs) | 39 DIR_VALUES_ACCESSOR (include_dirs) |
39 STRING_VALUES_ACCESSOR(ldflags) | 40 STRING_VALUES_ACCESSOR(ldflags) |
40 DIR_VALUES_ACCESSOR (lib_dirs) | 41 DIR_VALUES_ACCESSOR (lib_dirs) |
41 STRING_VALUES_ACCESSOR(libs) | 42 STRING_VALUES_ACCESSOR(libs) |
(...skipping 12 matching lines...) Expand all Loading... |
54 precompiled_header_ = f; | 55 precompiled_header_ = f; |
55 } | 56 } |
56 const SourceFile& precompiled_source() const { | 57 const SourceFile& precompiled_source() const { |
57 return precompiled_source_; | 58 return precompiled_source_; |
58 } | 59 } |
59 void set_precompiled_source(const SourceFile& f) { | 60 void set_precompiled_source(const SourceFile& f) { |
60 precompiled_source_ = f; | 61 precompiled_source_ = f; |
61 } | 62 } |
62 | 63 |
63 private: | 64 private: |
| 65 std::vector<std::string> asmflags_; |
64 std::vector<std::string> cflags_; | 66 std::vector<std::string> cflags_; |
65 std::vector<std::string> cflags_c_; | 67 std::vector<std::string> cflags_c_; |
66 std::vector<std::string> cflags_cc_; | 68 std::vector<std::string> cflags_cc_; |
67 std::vector<std::string> cflags_objc_; | 69 std::vector<std::string> cflags_objc_; |
68 std::vector<std::string> cflags_objcc_; | 70 std::vector<std::string> cflags_objcc_; |
69 std::vector<std::string> defines_; | 71 std::vector<std::string> defines_; |
70 std::vector<SourceDir> include_dirs_; | 72 std::vector<SourceDir> include_dirs_; |
71 std::vector<std::string> ldflags_; | 73 std::vector<std::string> ldflags_; |
72 std::vector<SourceDir> lib_dirs_; | 74 std::vector<SourceDir> lib_dirs_; |
73 std::vector<std::string> libs_; | 75 std::vector<std::string> libs_; |
74 // If you add a new one, be sure to update AppendValues(). | 76 // If you add a new one, be sure to update AppendValues(). |
75 | 77 |
76 std::string precompiled_header_; | 78 std::string precompiled_header_; |
77 SourceFile precompiled_source_; | 79 SourceFile precompiled_source_; |
78 }; | 80 }; |
79 | 81 |
80 #endif // TOOLS_GN_CONFIG_VALUES_H_ | 82 #endif // TOOLS_GN_CONFIG_VALUES_H_ |
OLD | NEW |