summaryrefslogtreecommitdiffstats
path: root/tools/gn/config_values_extractors.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gn/config_values_extractors.cc')
-rw-r--r--tools/gn/config_values_extractors.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/gn/config_values_extractors.cc b/tools/gn/config_values_extractors.cc
new file mode 100644
index 0000000..96b514a
--- /dev/null
+++ b/tools/gn/config_values_extractors.cc
@@ -0,0 +1,22 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "tools/gn/config_values_extractors.h"
+
+namespace {
+
+struct StringWriter {
+ void operator()(const std::string& s, std::ostream& out) const {
+ out << " " << s;
+ }
+};
+
+} // namespace
+
+void RecursiveTargetConfigStringsToStream(
+ const Target* target,
+ const std::vector<std::string>& (ConfigValues::* getter)() const,
+ std::ostream& out) {
+ RecursiveTargetConfigToStream(target, getter, StringWriter(), out);
+}