Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(693)

Side by Side Diff: tools/gn/config_values.h

Issue 1606553002: Add support for Mac/iOS application bundles to GN tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: base_unittests builds and pass all tests with GN Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
22 22
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 #define SRC_VALUES_ACCESSOR(name) \
33 const std::vector<SourceFile>& name() const { return name##_; } \
brettw 2016/01/20 22:23:17 Putting this on config values seems wrong to me. N
sdefresne 2016/01/21 22:00:56 Done. Code is much cleaner. Thanks.
34 std::vector<SourceFile>& name() { return name##_; }
32 35
33 STRING_VALUES_ACCESSOR(asmflags) 36 STRING_VALUES_ACCESSOR(asmflags)
34 STRING_VALUES_ACCESSOR(cflags) 37 STRING_VALUES_ACCESSOR(cflags)
35 STRING_VALUES_ACCESSOR(cflags_c) 38 STRING_VALUES_ACCESSOR(cflags_c)
36 STRING_VALUES_ACCESSOR(cflags_cc) 39 STRING_VALUES_ACCESSOR(cflags_cc)
37 STRING_VALUES_ACCESSOR(cflags_objc) 40 STRING_VALUES_ACCESSOR(cflags_objc)
38 STRING_VALUES_ACCESSOR(cflags_objcc) 41 STRING_VALUES_ACCESSOR(cflags_objcc)
39 STRING_VALUES_ACCESSOR(defines) 42 STRING_VALUES_ACCESSOR(defines)
40 DIR_VALUES_ACCESSOR (include_dirs) 43 DIR_VALUES_ACCESSOR (include_dirs)
41 STRING_VALUES_ACCESSOR(ldflags) 44 STRING_VALUES_ACCESSOR(ldflags)
42 DIR_VALUES_ACCESSOR (lib_dirs) 45 DIR_VALUES_ACCESSOR (lib_dirs)
46 SRC_VALUES_ACCESSOR (bundle_data)
43 // If you add a new one, be sure to update AppendValues(). 47 // If you add a new one, be sure to update AppendValues().
44 48
45 #undef STRING_VALUES_ACCESSOR 49 #undef STRING_VALUES_ACCESSOR
46 #undef DIR_VALUES_ACCESSOR 50 #undef DIR_VALUES_ACCESSOR
51 #undef SRC_VALUES_ACCESSOR
47 52
48 const std::vector<LibFile>& libs() const { return libs_; } 53 const std::vector<LibFile>& libs() const { return libs_; }
49 std::vector<LibFile>& libs() { return libs_; } 54 std::vector<LibFile>& libs() { return libs_; }
50 55
51 bool has_precompiled_headers() const { 56 bool has_precompiled_headers() const {
52 return !precompiled_header_.empty() || !precompiled_source_.is_null(); 57 return !precompiled_header_.empty() || !precompiled_source_.is_null();
53 } 58 }
54 const std::string& precompiled_header() const { 59 const std::string& precompiled_header() const {
55 return precompiled_header_; 60 return precompiled_header_;
56 } 61 }
(...skipping 12 matching lines...) Expand all
69 std::vector<std::string> cflags_; 74 std::vector<std::string> cflags_;
70 std::vector<std::string> cflags_c_; 75 std::vector<std::string> cflags_c_;
71 std::vector<std::string> cflags_cc_; 76 std::vector<std::string> cflags_cc_;
72 std::vector<std::string> cflags_objc_; 77 std::vector<std::string> cflags_objc_;
73 std::vector<std::string> cflags_objcc_; 78 std::vector<std::string> cflags_objcc_;
74 std::vector<std::string> defines_; 79 std::vector<std::string> defines_;
75 std::vector<SourceDir> include_dirs_; 80 std::vector<SourceDir> include_dirs_;
76 std::vector<std::string> ldflags_; 81 std::vector<std::string> ldflags_;
77 std::vector<SourceDir> lib_dirs_; 82 std::vector<SourceDir> lib_dirs_;
78 std::vector<LibFile> libs_; 83 std::vector<LibFile> libs_;
84 std::vector<SourceFile> bundle_data_;
79 // If you add a new one, be sure to update AppendValues(). 85 // If you add a new one, be sure to update AppendValues().
80 86
81 std::string precompiled_header_; 87 std::string precompiled_header_;
82 SourceFile precompiled_source_; 88 SourceFile precompiled_source_;
83 }; 89 };
84 90
85 #endif // TOOLS_GN_CONFIG_VALUES_H_ 91 #endif // TOOLS_GN_CONFIG_VALUES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698