| 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 STRING_VALUES_ACCESSOR(arflags) |
| 33 STRING_VALUES_ACCESSOR(asmflags) | 34 STRING_VALUES_ACCESSOR(asmflags) |
| 34 STRING_VALUES_ACCESSOR(cflags) | 35 STRING_VALUES_ACCESSOR(cflags) |
| 35 STRING_VALUES_ACCESSOR(cflags_c) | 36 STRING_VALUES_ACCESSOR(cflags_c) |
| 36 STRING_VALUES_ACCESSOR(cflags_cc) | 37 STRING_VALUES_ACCESSOR(cflags_cc) |
| 37 STRING_VALUES_ACCESSOR(cflags_objc) | 38 STRING_VALUES_ACCESSOR(cflags_objc) |
| 38 STRING_VALUES_ACCESSOR(cflags_objcc) | 39 STRING_VALUES_ACCESSOR(cflags_objcc) |
| 39 STRING_VALUES_ACCESSOR(defines) | 40 STRING_VALUES_ACCESSOR(defines) |
| 40 DIR_VALUES_ACCESSOR (include_dirs) | 41 DIR_VALUES_ACCESSOR (include_dirs) |
| 41 STRING_VALUES_ACCESSOR(ldflags) | 42 STRING_VALUES_ACCESSOR(ldflags) |
| 42 DIR_VALUES_ACCESSOR (lib_dirs) | 43 DIR_VALUES_ACCESSOR (lib_dirs) |
| (...skipping 15 matching lines...) Expand all Loading... |
| 58 precompiled_header_ = f; | 59 precompiled_header_ = f; |
| 59 } | 60 } |
| 60 const SourceFile& precompiled_source() const { | 61 const SourceFile& precompiled_source() const { |
| 61 return precompiled_source_; | 62 return precompiled_source_; |
| 62 } | 63 } |
| 63 void set_precompiled_source(const SourceFile& f) { | 64 void set_precompiled_source(const SourceFile& f) { |
| 64 precompiled_source_ = f; | 65 precompiled_source_ = f; |
| 65 } | 66 } |
| 66 | 67 |
| 67 private: | 68 private: |
| 69 std::vector<std::string> arflags_; |
| 68 std::vector<std::string> asmflags_; | 70 std::vector<std::string> asmflags_; |
| 69 std::vector<std::string> cflags_; | 71 std::vector<std::string> cflags_; |
| 70 std::vector<std::string> cflags_c_; | 72 std::vector<std::string> cflags_c_; |
| 71 std::vector<std::string> cflags_cc_; | 73 std::vector<std::string> cflags_cc_; |
| 72 std::vector<std::string> cflags_objc_; | 74 std::vector<std::string> cflags_objc_; |
| 73 std::vector<std::string> cflags_objcc_; | 75 std::vector<std::string> cflags_objcc_; |
| 74 std::vector<std::string> defines_; | 76 std::vector<std::string> defines_; |
| 75 std::vector<SourceDir> include_dirs_; | 77 std::vector<SourceDir> include_dirs_; |
| 76 std::vector<std::string> ldflags_; | 78 std::vector<std::string> ldflags_; |
| 77 std::vector<SourceDir> lib_dirs_; | 79 std::vector<SourceDir> lib_dirs_; |
| 78 std::vector<LibFile> libs_; | 80 std::vector<LibFile> libs_; |
| 79 // If you add a new one, be sure to update AppendValues(). | 81 // If you add a new one, be sure to update AppendValues(). |
| 80 | 82 |
| 81 std::string precompiled_header_; | 83 std::string precompiled_header_; |
| 82 SourceFile precompiled_source_; | 84 SourceFile precompiled_source_; |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 #endif // TOOLS_GN_CONFIG_VALUES_H_ | 87 #endif // TOOLS_GN_CONFIG_VALUES_H_ |
| OLD | NEW |