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

Unified Diff: tools/gn/config_values.h

Issue 21983003: Make the Mac build work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dunnow Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/BUILD.gn ('k') | tools/gn/config_values_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/config_values.h
diff --git a/tools/gn/config_values.h b/tools/gn/config_values.h
index e7c17122af0f724d11d5b629dc0507fbb6d64364..9a0aad25f914165f19d0cb783983b7a85f208b1b 100644
--- a/tools/gn/config_values.h
+++ b/tools/gn/config_values.h
@@ -21,20 +21,19 @@ class ConfigValues {
const std::vector<SourceDir>& includes() const { return includes_; }
void swap_in_includes(std::vector<SourceDir>* lo) { includes_.swap(*lo); }
- const std::vector<std::string>& defines() const { return defines_; }
- void swap_in_defines(std::vector<std::string>* d) { defines_.swap(*d); }
+#define VALUES_ACCESSOR(name) \
+ const std::vector<std::string>& name() const { return name##_; } \
+ void swap_in_##name(std::vector<std::string>* v) { name##_.swap(*v); }
- const std::vector<std::string>& cflags() const { return cflags_; }
- void swap_in_cflags(std::vector<std::string>* lo) { cflags_.swap(*lo); }
+ VALUES_ACCESSOR(defines)
+ VALUES_ACCESSOR(cflags)
+ VALUES_ACCESSOR(cflags_c)
+ VALUES_ACCESSOR(cflags_cc)
+ VALUES_ACCESSOR(cflags_objc)
+ VALUES_ACCESSOR(cflags_objcc)
+ VALUES_ACCESSOR(ldflags)
- const std::vector<std::string>& cflags_c() const { return cflags_c_; }
- void swap_in_cflags_c(std::vector<std::string>* lo) { cflags_c_.swap(*lo); }
-
- const std::vector<std::string>& cflags_cc() const { return cflags_cc_; }
- void swap_in_cflags_cc(std::vector<std::string>* lo) { cflags_cc_.swap(*lo); }
-
- const std::vector<std::string>& ldflags() const { return ldflags_; }
- void swap_in_ldflags(std::vector<std::string>* lo) { ldflags_.swap(*lo); }
+#undef VALUES_ACCESSOR
private:
std::vector<SourceDir> includes_;
@@ -42,6 +41,8 @@ class ConfigValues {
std::vector<std::string> cflags_;
std::vector<std::string> cflags_c_;
std::vector<std::string> cflags_cc_;
+ std::vector<std::string> cflags_objc_;
+ std::vector<std::string> cflags_objcc_;
std::vector<std::string> ldflags_;
DISALLOW_COPY_AND_ASSIGN(ConfigValues);
« no previous file with comments | « tools/gn/BUILD.gn ('k') | tools/gn/config_values_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698